vpx_dsp/x86/sad4d_avx512.c:27:14: warning: implicit declaration of function '_mm512_set1_epi16' is invalid in C99 [-Wimplicit-function-declaration] sum_ref0 = _mm512_set1_epi16(0); ^ The code is:
vpx_dsp/x86/sad4d_avx512.c:29:12: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref0 = _mm512_set1_epi16(0); ^ ~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:30:12: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref1 = _mm512_set1_epi16(0); ^ ~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:31:12: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref2 = _mm512_set1_epi16(0); ^ ~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:32:12: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref3 = _mm512_set1_epi16(0); ^ ~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:35:15: warning: implicit declaration of function '_mm512_loadu_si512' is invalid in C99 [-Wimplicit-function-declaration] src_reg = _mm512_loadu_si512((const __m512i *)src); ^ vpx_dsp/x86/sad4d_avx512.c:35:13: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' src_reg = _mm512_loadu_si512((const __m512i *)src); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:36:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref0_reg = _mm512_loadu_si512((const __m512i *)ref0); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:37:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref1_reg = _mm512_loadu_si512((const __m512i *)ref1); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:38:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref2_reg = _mm512_loadu_si512((const __m512i *)ref2); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:39:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref3_reg = _mm512_loadu_si512((const __m512i *)ref3); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:41:16: warning: implicit declaration of function '_mm512_sad_epu8' is invalid in C99 [-Wimplicit-function-declaration] ref0_reg = _mm512_sad_epu8(ref0_reg, src_reg); ^ vpx_dsp/x86/sad4d_avx512.c:41:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref0_reg = _mm512_sad_epu8(ref0_reg, src_reg); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:42:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref1_reg = _mm512_sad_epu8(ref1_reg, src_reg); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:43:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref2_reg = _mm512_sad_epu8(ref2_reg, src_reg); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:44:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' ref3_reg = _mm512_sad_epu8(ref3_reg, src_reg); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:63:16: warning: implicit declaration of function '_mm512_bslli_epi128' is invalid in C99 [-Wimplicit-function-declaration] sum_ref1 = _mm512_bslli_epi128(sum_ref1, 4); ^ vpx_dsp/x86/sad4d_avx512.c:63:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref1 = _mm512_bslli_epi128(sum_ref1, 4); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:64:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_ref3 = _mm512_bslli_epi128(sum_ref3, 4); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:71:16: warning: implicit declaration of function '_mm512_unpacklo_epi64' is invalid in C99 [-Wimplicit-function-declaration] sum_mlow = _mm512_unpacklo_epi64(sum_ref0, sum_ref2); ^ vpx_dsp/x86/sad4d_avx512.c:71:14: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_mlow = _mm512_unpacklo_epi64(sum_ref0, sum_ref2); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:72:17: warning: implicit declaration of function '_mm512_unpackhi_epi64' is invalid in C99 [-Wimplicit-function-declaration] sum_mhigh = _mm512_unpackhi_epi64(sum_ref0, sum_ref2); ^ vpx_dsp/x86/sad4d_avx512.c:72:15: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int' sum_mhigh = _mm512_unpackhi_epi64(sum_ref0, sum_ref2); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vpx_dsp/x86/sad4d_avx512.c:78:31: warning: implicit declaration of function '_mm512_castsi512_si256' is invalid in C99 [-Wimplicit-function-declaration] sum256 = _mm256_add_epi32(_mm512_castsi512_si256(sum_mlow), ^ vpx_dsp/x86/sad4d_avx512.c:79:31: warning: implicit declaration of function '_mm512_extracti32x8_epi32' is invalid in C99 [-Wimplicit-function-declaration] _mm512_extracti32x8_epi32(sum_mlow, 1)); ^ vpx_dsp/x86/sad4d_avx512.c:78:31: error: passing 'int' to parameter of incompatible type '__m256i' (vector of 4 'long long' values) sum256 = _mm256_add_epi32(_mm512_castsi512_si256(sum_mlow), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/avx2intrin.h:92:26: note: passing argument to parameter '__a' here _mm256_add_epi32(__m256i __a, __m256i __b) ^ 8 warnings and 18 errors generated. make[1]: *** [vpx_dsp/x86/sad4d_avx512.c.o] Error 1 make: *** [.DEFAULT] Error 2
hossam.a… via monorail
unread,
Jun 7, 2018, 12:31:08 PM6/7/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
The macports bug you cite in your bug report seems to clearly point out that this is an issue with older clang releases. What version of Xcode are you using, and is there a reason why you can't use a newer release?
jz… via monorail
unread,
Jun 7, 2018, 1:47:39 PM6/7/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Sorry for the confusion, I mistook this as an aomedia bug report. I was looking for the output from the ./configure run and make V=1 in this case; note there are no spaces around the '=' in the command line.
jz… via monorail
unread,
Jun 7, 2018, 1:48:56 PM6/7/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
> I have already shown the output with 'make V=1' without space -- Sorry about my typo.
It hasn't been added to the bug:
> [CC] vpx_dsp/x86/sad4d_avx512.c.o
Instead of "[CC] vpx_dsp/x86/sad4d_avx512.c.o" you would see a full compile command here for make V=1.
> I added --disable-avx512 and now libvpx produces: > > test/bench.cc:34:12: error: use of undeclared identifier 'abs' > sad += abs(times[t] - med); > ^ > 1 error generated.
If you're not running the unit tests your can work around this by adding --disable-unit-tests to your configure command.
> Another question, do you run vp9 from ffmpeg? or you can run it as a standalone application?
Both. VP9 video can be encoded using vpxenc from the libvpx repository, or by including libvpx in an FFmpeg build. Note, generally speaking, the bug tracker is not a help forum. This question would be better posed on a mailing list like webm-d...@webmproject.org.
hossam.a… via monorail
unread,
Jun 7, 2018, 4:16:12 PM6/7/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
> Instead of "[CC] vpx_dsp/x86/sad4d_avx512.c.o" you would see a full compile command here for make V=1.
Here is the command that produced the original error: gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -arch x86_64 -DNDEBUG -O3 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wparentheses-equality -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused -Wextra -Wundef -Wframe-larger-than=52000 -Wshorten-64-to-32 -I. -I"/Users/hossam.amer/7aS7aS_Works/work/workspace/vp9/src/libvpx" -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl -c -o vpx_dsp/x86/sad4d_avx512.c.o vpx_dsp/x86/sad4d_avx512.c
> If you're not running the unit tests your can work around this by adding --disable-unit-tests to your configure command.
If I do this, this is what I get: Undefined symbols for architecture x86_64: "_vpx_sad64x64x4d_avx512", referenced from: _setup_rtcd_internal in libvpx.a(vpx_dsp_rtcd.c.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [vpxdec] Error 1
make: *** [.DEFAULT] Error 2
> Both. VP9 video can be encoded using vpxenc from the libvpx repository, or by including libvpx in an FFmpeg build. Note, generally speaking, the bug tracker is not a help forum. This question would be better posed on a mailing list like webm-d...@webmproject.org.
Sure! Do you think that I should post my last questions over there?
bugdro… via monorail
unread,
Jun 8, 2018, 11:11:55 AM6/8/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
commit 393f7856587d58292febb0a3e82edc405aab4498 Author: Tom Finegan <tomfi...@google.com> Date: Thu Jun 07 23:05:48 2018
Add avx512 compile test.
Some compiler releases allow the -mavx512f arg without actually implementing support. Test for this situation, and disable avx512 when it is detected by configure.
This is "fixed" in that the reported issue will no longer occur, but additional checks that map specific AVX512 intrinsics to their corresponding flags might be necessary.
For example, in Xcode 9.3.1, AppleClang enables _mm512_set1_epi16() with the -mavx512f flag. The patch in #15 tests that combination (-mavx512f with a compile test that uses _mm512_set1_epi16()). The patch simply disables all AVX512 optimizations when the test fails. It's theoretically possible that a compiler release will support that combination while not supporting others, and in that case the fix here will need to be extended.
Marking fixed for now since the reported issue no longer reproduces. This bug could need to be reopened.