-
|
When at build time we enable a compiler feature like AVX-512 with the corresponding CMake option ( It other words, is it safe to enable all compiler features (SSSE3, SSE4, AVX, AVX2 and AVX-512) in distributed builds? By examining the source code, my understanding is that we can safely enable all compiler features in distributed builds, as it will detect at run time if a given feature is supported by the running CPU. But I'm asking just to make sure. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi Daniel, Thank you for contacting me. The code performs run-time detection of CPU features, and only uses code paths that are supported by the available features. Feature detection code is in Kind regards, |
Beta Was this translation helpful? Give feedback.
Hi Daniel,
Thank you for contacting me.
The code performs run-time detection of CPU features, and only uses code paths that are supported by the available features.
You can enable AVX-512 all the time, and the code should run fine on any machine.
The CMake configuration flags are mainly for testing and should a compiler not support them.
Feature detection code is in
https://github.com/aous72/OpenJPH/blob/master/src/core/others/ojph_arch.cpp
Kind regards,
Aous.