Closed fengyuleidian0615 closed 6 years ago
Thanks for the report. I see the compilation flag for avx512f-alignr.cpp is wrong. It is -mavx512f, but I guess it should be -mavx512bw.
@WojciechMula Thanks for your reply!
I tried -mavx512bw, -mavx512vl, -mavx512vl, No luck/scratching head.... gcc bug?
root@00e191a33132:/ws/avx512cd# make g++ -std=c++11 -O3 -Wall -Wextra -pedantic -mavx512bw avx512f-alignr.cpp -o avx512f-alignr In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:55:0, from avx512f-alignr.cpp:10: /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h: In function 'void validate()': /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h:2431:33: error: the last argument must be an 8-bit immediate (v8di) B, N * 8); ^ Makefile:9: recipe for target 'avx512f-alignr' failed make: *** [avx512f-alignr] Error 1 root@00e191a33132:/ws/avx512cd# g++ -std=c++11 -O3 -Wall -Wextra -pedantic -mavx512dq avx512f-alignr.cpp -o avx512f-alignr In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:55:0, from avx512f-alignr.cpp:10: /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h: In function 'void validate()': /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h:2428:1: error: inlining failed in call to always_inline 'm512i _mm512_alignr_epi8(m512i, m512i, int)': target specific option mismatch _mm512_alignr_epi8 (m512i A, m512i B, const int N) ^ avx512f-alignr.cpp:77:61: error: called from here const m512i res = _mm512_alignr_epi8(hi, lo, shift); ^ root@00e191a33132:/ws/avx512cd# g++ -std=c++11 -O3 -Wall -Wextra -pedantic -mavx512vl avx512f-alignr.cpp -o avx512f-alignr In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:55:0, from avx512f-alignr.cpp:10: /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h: In function 'void validate()': /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h:2428:1: error: inlining failed in call to always_inline 'm512i _mm512_alignr_epi8(m512i, m512i, int)': target specific option mismatch _mm512_alignr_epi8 (m512i A, m512i B, const int N) ^ avx512f-alignr.cpp:77:61: error: called from here const __m512i res = _mm512_alignr_epi8(hi, lo, shift); ^
@fengyuleidian0615 That's strange, GCC's avx512bwintrin.h assumes option avx512bw. Will check it when back home.
I hope it's fixed now.
Hi
I'm unable to compile toy/avx512 collision detection demo, My server cpu does have avx512cd supported, am I missing something here? Thanks!
root@knld01:~/dufan/avx512/toys/avx512# make g++ -std=c++11 -O3 -Wall -Wextra -pedantic -mavx512f avx512f-alignr.cpp -o avx512f-alignr In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:55:0, from avx512f-alignr.cpp:10: /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h: In function ‘void validate()’: /usr/lib/gcc/x86_64-linux-gnu/5/include/avx512bwintrin.h:2428:1: error: inlining failed in call to always_inline ‘m512i _mm512_alignr_epi8(m512i, m512i, int)’: target specific option mismatch _mm512_alignr_epi8 (m512i A, m512i B, const int N) ^ avx512f-alignr.cpp:77:61: error: called from here const __m512i res = _mm512_alignr_epi8(hi, lo, shift); ^ Makefile:9: recipe for target 'avx512f-alignr' failed make: *** [avx512f-alignr] Error 1
root@knld01:/dufan/avx512/toys/avx512# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu116.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)