Skip to content

core: fix F16C compilation check#18782

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:issue_18779
Nov 17, 2020
Merged

core: fix F16C compilation check#18782
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:issue_18779

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Nov 11, 2020

resolves #18779

force_builders=Linux AVX2,Custom
buildworker:Custom=linux-3
build_image:Custom=ubuntu:18.04
CPU_BASELINE:Custom=AVX512_SKX
disable_ipp=ON

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 12, 2020

@vrabaud Please take a look on this patch.

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 12, 2020

I believe you also need to fix intrin_avx2.hpp
Just check for cvtps_ph and cvtph_ps

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 12, 2020

This patch solves my initial problem, thx !
(but I still believe intrin_avx2.hpp needs to be fixed)

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 12, 2020

intrin_avx2.hpp

BTW, there is no intrin_avx2.hpp file (intrin_avx.hpp is used for AVX2 code due to legacy reasons)

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 12, 2020

Ah, my bad, I meant: intrin_avx512.hpp

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 13, 2020

Hmm, actually wait before merging, I still have an error when compiling for haswell with clang.
I get the error: error: use of undeclared identifier '_mm_cvtps_ph'; did you mean '_mm_cvtss_sd' in cvdef.h

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 13, 2020

compiling for haswell with clang.

Do you compile OpenCV itself or use OpenCV?

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 15, 2020

@vrabaud Could you please describe observed problem here ? (press "Share" after modification and dump here provided link)

(you can dump included headers in your code through adding of -H option)

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 17, 2020

@vrabaud Updated, please take a look.

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 17, 2020

Hi, sorry for the delay. You did fix the initial issue.
Now, the other issue I mentioned (with haswell) is actually a different problem (independent from compiler flags): if you only include types_c.h in your code, you have a problem because it includes cvdef.h at https://github.com/opencv/opencv/blob/master/modules/core/include/opencv2/core/types_c.h#L84
which does SIMD stuff while no SIMD header was included. Hence the error:
error: missing '#include <immintrin.h>'; '_mm_cvtph_ps' must be declared before it is used
(I had only looked at the beginning of the haswell error, not the end)

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 17, 2020

This case should be handled in cv_cpu_dispatch.h now.

@vrabaud
Copy link
Copy Markdown
Contributor

vrabaud commented Nov 17, 2020

Thx a bunch, I confirm my two issues are fixed ! Ready to merge !

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 17, 2020

👍

@opencv-pushbot opencv-pushbot merged commit b645fc1 into opencv:3.4 Nov 17, 2020
@alalek alalek mentioned this pull request Nov 17, 2020
@alalek alalek mentioned this pull request Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AVX does not necessarily imply FP16c (even though OpenCV's CMake does)

3 participants