You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build my project for avx512 but I'm getting some errors which can be reproduced building the test on the same target.
[ 6%] Building CXX object CMakeFiles/run_tests.dir/src/arithmetic_operations/fmadd.cpp.o
[ 6%] Building CXX object CMakeFiles/run_tests.dir/src/arithmetic_operations/div4.cpp.o
[ 6%] Building CXX object CMakeFiles/run_tests.dir/src/arithmetic_operations/div.cpp.o
[ 6%] Building CXX object CMakeFiles/run_tests.dir/src/arithmetic_operations/div2.cpp.o
In file included from /home/debian/MIPP/tests/../src/mipp.h:1240:0,
from /home/debian/MIPP/tests/src/arithmetic_operations/div4.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = long int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2164:29: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi64(_mm512_castps_si512(v1), n));
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/immintrin.h:45:0,
from /home/debian/MIPP/tests/../src/math/avx512_mathfun.h:14,
from /home/debian/MIPP/tests/../src/mipp.h:45,
from /home/debian/MIPP/tests/src/arithmetic_operations/div4.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2170:30: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi32(_mm512_castps_si512(v1), n));
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/immintrin.h:55:0,
from /home/debian/MIPP/tests/../src/math/avx512_mathfun.h:14,
from /home/debian/MIPP/tests/../src/mipp.h:45,
from /home/debian/MIPP/tests/src/arithmetic_operations/div4.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = short int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2176:30: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi16(_mm512_castps_si512(v1), n));
^
In file included from /home/debian/MIPP/tests/../src/mipp.h:1240:0,
from /home/debian/MIPP/tests/src/arithmetic_operations/div2.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = long int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2164:29: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi64(_mm512_castps_si512(v1), n));
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/immintrin.h:45:0,
from /home/debian/MIPP/tests/../src/math/avx512_mathfun.h:14,
from /home/debian/MIPP/tests/../src/mipp.h:45,
from /home/debian/MIPP/tests/src/arithmetic_operations/div2.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2170:30: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi32(_mm512_castps_si512(v1), n));
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/immintrin.h:55:0,
from /home/debian/MIPP/tests/../src/math/avx512_mathfun.h:14,
from /home/debian/MIPP/tests/../src/mipp.h:45,
from /home/debian/MIPP/tests/src/arithmetic_operations/div2.cpp:6:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx: In function ‘mipp::reg mipp::rshift(mipp::reg, uint32_t) [with T = short int]’:
/home/debian/MIPP/tests/../src/mipp_impl_AVX512.hxx:2176:30: error: the last argument must be an 8-bit immediate
return _mm512_castsi512_ps(_mm512_srli_epi16(_mm512_castps_si512(v1), n));
^
CMakeFiles/run_tests.dir/build.make:182: recipe for target 'CMakeFiles/run_tests.dir/src/arithmetic_operations/div4.cpp.o' failed
make[2]: *** [CMakeFiles/run_tests.dir/src/arithmetic_operations/div4.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 8%] Building CXX object CMakeFiles/run_tests.dir/src/arithmetic_operations/fmsub.cpp.o
CMakeFiles/run_tests.dir/build.make:158: recipe for target 'CMakeFiles/run_tests.dir/src/arithmetic_operations/div2.cpp.o' failed
make[2]: *** [CMakeFiles/run_tests.dir/src/arithmetic_operations/div2.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/run_tests.dir/all' failed
make[1]: *** [CMakeFiles/run_tests.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
Yes I'm aware of this bug. The problem is that the shift instruction is waiting for an argument known at the compile time (an immediate). This is not the case in MIPP if the compiler does not perform some inlining optimizations so you have to compile with -O2 or -O3 to fix this compiler error. Try this and tell me if you have still the bug.
Maybe we could change the call into _mm512_srlv_epi64/_mm512_srlv_epi32/_mm512_srlv_epi16, This requires a register as second argument, which needs not to be known at compile time 😉
I tried to build my project for avx512 but I'm getting some errors which can be reproduced building the test on the same target.
The text was updated successfully, but these errors were encountered: