From 55bbbe8657d953a013a4a630128057327ce4439f Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Tue, 3 May 2022 09:52:31 -0500 Subject: yaksa: add ROCm variant (#30222) --- var/spack/repos/builtin/packages/yaksa/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2