Make archspec a vendored dependency (#19600)
- Added archspec to the list of vendored dependencies - Removed every reference to llnl.util.cpu - Removed tests from Spack code base
This commit is contained in:
committed by
GitHub
parent
f82e858238
commit
458d88eaad
@@ -2,7 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import llnl.util.cpu
|
||||
import archspec.cpu
|
||||
|
||||
|
||||
class Gromacs(CMakePackage):
|
||||
@@ -158,25 +158,25 @@ def cmake_args(self):
|
||||
|
||||
# Activate SIMD based on properties of the target
|
||||
target = self.spec.target
|
||||
if target >= llnl.util.cpu.targets['zen2']:
|
||||
if target >= archspec.cpu.TARGETS['zen2']:
|
||||
# AMD Family 17h (EPYC Rome)
|
||||
options.append('-DGMX_SIMD=AVX2_256')
|
||||
elif target >= llnl.util.cpu.targets['zen']:
|
||||
elif target >= archspec.cpu.TARGETS['zen']:
|
||||
# AMD Family 17h (EPYC Naples)
|
||||
options.append('-DGMX_SIMD=AVX2_128')
|
||||
elif target >= llnl.util.cpu.targets['bulldozer']:
|
||||
elif target >= archspec.cpu.TARGETS['bulldozer']:
|
||||
# AMD Family 15h
|
||||
options.append('-DGMX_SIMD=AVX_128_FMA')
|
||||
elif 'vsx' in target:
|
||||
# IBM Power 7 and beyond
|
||||
options.append('-DGMX_SIMD=IBM_VSX')
|
||||
elif target.family == llnl.util.cpu.targets['aarch64']:
|
||||
elif target.family == archspec.cpu.TARGETS['aarch64']:
|
||||
# ARMv8
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
options.append('-DGMX_SIMD=None')
|
||||
else:
|
||||
options.append('-DGMX_SIMD=ARM_NEON_ASIMD')
|
||||
elif target == llnl.util.cpu.targets['mic_knl']:
|
||||
elif target == archspec.cpu.TARGETS['mic_knl']:
|
||||
# Intel KNL
|
||||
options.append('-DGMX_SIMD=AVX_512_KNL')
|
||||
elif target.vendor == 'GenuineIntel':
|
||||
|
||||
Reference in New Issue
Block a user