-
@kshegunov said in Inlining Failed AVX-512:
-mnative
Thanks for the fast response. Anything else I can provide.
CONFIG += c++11 -mavx512f -mnative
Program
int n = 512; double c[8*8]; double b[8*8]; __m512d sv = _mm512_set1_pd(1.0); for (int i = 0;i<n/8 ;i++ ) { __m512d cv = _mm512_loadu_pd(&c[8*i]); __m512d bv = _mm512_loadu_pd(&b[8*i]); __m512d t1 = _mm512_mul_pd(bv, sv); cv = _mm512_add_pd(t1, cv); _mm512_store_pd(&c[8*i], cv); }
Errors
D:\QtPrograms\TryIntrinsics2\mainwindow.cpp:17: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] ..\TryIntrinsics2\mainwindow.cpp:17:36: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] __m512d sv = _mm512_set1_pd(1.0); ^D:\Qt\Tools\mingw810_64\lib\gcc\x86_64-w64-mingw32\8.1.0\include\avx512fintrin.h:190: error: inlining failed in call to always_inline '__m512d _mm512_set1_pd(double)': target specific option mismatch In file included from D:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:45, from ..\TryIntrinsics2\mainwindow.h:6, from ..\TryIntrinsics2\mainwindow.cpp:1: D:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avx512fintrin.h:190:1: error: inlining failed in call to always_inline '__m512d _mm512_set1_pd(double)': target specific option mismatch _mm512_set1_pd (double __A) ^~~~~~~~~~~~~~ ..\TryIntrinsics2\mainwindow.cpp:17:32: note: called from here __m512d sv = _mm512_set1_pd(1.0); ~~~~~~~~~~~~~~^~~~~
-
Please format your posts.
CONFIG += c++11 -mavx512f -mnative
doesn't do anything.
-mnative
and-mavx512f
are flags that should be passed to the compiler. They've nothing to do with theCONFIG
variable of a project file. Here:
https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-cxxflags -
I added:
QMAKE_CXXFLAGS += -mavx512f -mnativeand the compile had this error
:-1: error: error: unrecognized command line option '-mnative'
I removed -mnative and it compiled with no errors.
I have used Qt for many years and I learned something new. Thanks for the help.
-