Detect AVX-512 FMA units to choose best SIMD
authorErik Lindahl <erik@kth.se>
Mon, 13 Nov 2017 17:48:05 +0000 (10:48 -0700)
committerErik Lindahl <erik.lindahl@gmail.com>
Fri, 24 Nov 2017 13:58:26 +0000 (14:58 +0100)
commitc6ce8efc35a5073d096aa2043136d0fc50d639a4
tree3ae0275f6c4ac0f0feabf18ff940401a8bc44fea
parent3f77f848d2900d49eb43d78a094f14323ef227f1
Detect AVX-512 FMA units to choose best SIMD

Add a test program that times AVX-512 code to
detect single vs. dual AVX-512 FMA units.
Added CMake code to always compile this file
with AVX-512 flags, both at CMake configuration
and runtime.
Tested to work on both AVX2 and AVX-512 hardware
with dual FMAs, and by manually faking single
FMA units, but when we get access to hardware
with a single AVX-512 FMA unit we need to check
that we produce the correct result.

Change-Id: I6240e864bc77f95085c5cd3303a84ab581eb3662
cmake/gmxDetectAvx512FmaUnits.cmake [new file with mode: 0644]
cmake/gmxDetectSimd.cmake
cmake/gmxManageSimd.cmake
cmake/gmxSimdFlags.cmake
src/config.h.cmakein
src/gromacs/CMakeLists.txt
src/gromacs/hardware/CMakeLists.txt
src/gromacs/hardware/identifyavx512fmaunits.cpp [new file with mode: 0644]
src/gromacs/hardware/identifyavx512fmaunits.h [new file with mode: 0644]
src/gromacs/hardware/printhardware.cpp
src/gromacs/simd/support.cpp