avx512fma test code warning with icpc
[1007/1273] Building CXX object src/gr.../hardware/identifyavx512fmaunits.cpp.o icpc: command line warning #10121: overriding '-march=core-avx2' with '-xCORE-AVX512'
Is there a way to have the compiler flags for this file only include the one for avx512 compilation? We don't need the usual gromacs flags since the only code here is to test for the avx512 support.
Replace intrinsic with inline asm for AVX512 unit test
Without high optimization, some compilers (icc) produce
assembly that lead to lots of store-to-load forwarding
during initialization, which screws up timing results.
The modified code uses inline asm without loading from
memory, which is fine since the inline (volatile) asm
will not be optimized. Tested to work and detect 2 FMA
units on Core i9-7920X and 1 FMA on Xeon Silver 4116,
with with gcc-5.4, gcc-7.1, icc 2017 and clang-5 with
optimization levels from -O0 to -O3. We also avoid
warning if we override the architecture with the
AVX-512 flags for the source file containing the asm.