summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@users.noreply.github.com>2022-05-03 09:52:31 -0500
committerGitHub <noreply@github.com>2022-05-03 16:52:31 +0200
commit55bbbe8657d953a013a4a630128057327ce4439f (patch)
tree4696283706e793b59ea1f895fbfab76edfc75f95
parenta6dcce4cf201379d75cca3e1a41deab8deadd6ee (diff)
downloadspack-55bbbe8657d953a013a4a630128057327ce4439f.tar.gz
spack-55bbbe8657d953a013a4a630128057327ce4439f.tar.bz2
spack-55bbbe8657d953a013a4a630128057327ce4439f.tar.xz
spack-55bbbe8657d953a013a4a630128057327ce4439f.zip
yaksa: add ROCm variant (#30222)
-rw-r--r--var/spack/repos/builtin/packages/yaksa/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py
index 30dc80da16..b8ded1866c 100644
--- a/var/spack/repos/builtin/packages/yaksa/package.py
+++ b/var/spack/repos/builtin/packages/yaksa/package.py
@@ -6,7 +6,7 @@
from spack import *
-class Yaksa(AutotoolsPackage, CudaPackage):
+class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Yaksa is a high-performance datatype engine for expressing,
managing and manipulating data present in noncontiguous memory
regions. It provides portable abstractions for structured
@@ -39,7 +39,16 @@ class Yaksa(AutotoolsPackage, CudaPackage):
sh('autogen.sh')
def configure_args(self):
+ spec = self.spec
config_args = []
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