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
Do we really need -mavx in any case?
If yes, what for?
Wouldn't it be better to let the user decide which instruction sets to use for possible optimizations?
Additionally, I am not a cmake professional by any means, but shouldn't the flags instead be set later on in target_compile_options(QuEST PRIVATE -Wall)?
The text was updated successfully, but these errors were encountered:
I believe AVX is on by default so as to attempt all compatible optimisations without a non-expert user being aware of them (like multithreading). I agree this makes it a bit awkward with incompatible architectures - perhaps one could argue that a user of such an architecture is sufficiently expert so as to be able to disable AVX trivially.
Furthermore, I'm not convinced AVX flags will even make a different on compatible architectures, since we don't explicitly call any AVX instructions - but I haven't yet a moment to confirm this.
I'm not sure if there's a need for mavx to be set in that somewhat inelegant way either, though @aniabrown is the expert on the CMake build.
We'll think more about this, thanks for pointing it out!
This is related to the problem in #184
When compiling on an architecture that does not support AVX, and then running QuEST, we get an illegal instruction, specifically at:
The culprit instructing specifically in this case is apparently
vcvtsi2sd
Notice the missing
avx
flag in the used cpu:A minimal example, given a cpu that does not support avx, can be achived with
and compiling with
gcc -mavx -o test test.c
.The problem as before lies in QuEST/CMakeLists.txt:205.
Do we really need
-mavx
in any case?If yes, what for?
Wouldn't it be better to let the user decide which instruction sets to use for possible optimizations?
Additionally, I am not a cmake professional by any means, but shouldn't the flags instead be set later on in
target_compile_options(QuEST PRIVATE -Wall)
?The text was updated successfully, but these errors were encountered: