yaksa: add ROCm variant (#30222)

This commit is contained in:
Ken Raffenetti 2022-05-03 09:52:31 -05:00 committed by GitHub
parent a6dcce4cf2
commit 55bbbe8657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
from spack import * from spack import *
class Yaksa(AutotoolsPackage, CudaPackage): class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Yaksa is a high-performance datatype engine for expressing, """Yaksa is a high-performance datatype engine for expressing,
managing and manipulating data present in noncontiguous memory managing and manipulating data present in noncontiguous memory
regions. It provides portable abstractions for structured regions. It provides portable abstractions for structured
@ -39,7 +39,16 @@ def autoreconf(self, spec, prefix):
sh('autogen.sh') sh('autogen.sh')
def configure_args(self): def configure_args(self):
spec = self.spec
config_args = [] config_args = []
config_args += self.with_or_without('cuda', activation_value='prefix') config_args += self.with_or_without('cuda', activation_value='prefix')
if '+rocm' in spec:
config_args.append('--with-hip={0}'.format(spec['hip'].prefix))
rocm_archs = spec.variants['amdgpu_target'].value
if 'none' not in rocm_archs:
config_args.append('--with-hip-sm={0}'.format(",".join(rocm_archs)))
else:
config_args.append('--without-hip')
return config_args return config_args