gromacs: add zen2 target SIMD optimizations (#18551)

Co-authored-by: Gvozden Nešković <neskovic@dev06.compeng.uni-frankfurt.de>
This commit is contained in:
Gvozden Neskovic 2020-09-08 14:52:56 +02:00 committed by GitHub
parent 73110b415d
commit c2b33b4444
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,12 +145,15 @@ def cmake_args(self):
# Activate SIMD based on properties of the target
target = self.spec.target
if target >= llnl.util.cpu.targets['bulldozer']:
if target >= llnl.util.cpu.targets['zen2']:
# AMD Family 17h (EPYC Rome)
options.append('-DGMX_SIMD=AVX2_256')
elif target >= llnl.util.cpu.targets['zen']:
# AMD Family 17h (EPYC Naples)
options.append('-DGMX_SIMD=AVX2_128')
elif target >= llnl.util.cpu.targets['bulldozer']:
# AMD Family 15h
options.append('-DGMX_SIMD=AVX_128_FMA')
elif target >= llnl.util.cpu.targets['zen']:
# AMD Family 17h
options.append('-DGMX_SIMD=AVX2_128')
elif target >= llnl.util.cpu.targets['power7']:
# IBM Power 7 and beyond
options.append('-DGMX_SIMD=IBM_VSX')