summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAuriane R <48684432+aurianer@users.noreply.github.com>2022-10-03 10:22:25 +0200
committerGitHub <noreply@github.com>2022-10-03 10:22:25 +0200
commit7ee8fd5926b8f6c61845e70fb61da28a4edbf7d5 (patch)
tree72dc4381b379a2671b79133d071d03ae45315547 /var
parent5a0f4970df9e97afe22ce4d8f02cf5427da381ae (diff)
downloadspack-7ee8fd5926b8f6c61845e70fb61da28a4edbf7d5.tar.gz
spack-7ee8fd5926b8f6c61845e70fb61da28a4edbf7d5.tar.bz2
spack-7ee8fd5926b8f6c61845e70fb61da28a4edbf7d5.tar.xz
spack-7ee8fd5926b8f6c61845e70fb61da28a4edbf7d5.zip
Set CMAKE_HIP_ARCHITECTURES with the value of amdgpu_target (#32901)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/pika/package.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py
index c6d46024f0..9098f57db3 100644
--- a/var/spack/repos/builtin/packages/pika/package.py
+++ b/var/spack/repos/builtin/packages/pika/package.py
@@ -142,9 +142,13 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
]
# HIP support requires compiling with hipcc for < 0.8.0
- if "@:0.7 +rocm" in self.spec:
+ if self.spec.satisfies("@:0.7 +rocm"):
args += [self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)]
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args += [self.define("__skip_rocmclang", True)]
+ if self.spec.satisfies("@0.8: +rocm"):
+ rocm_archs = spec.variants["amdgpu_target"].value
+ rocm_archs = ";".join(rocm_archs)
+ args.append(self.define("CMAKE_HIP_ARCHITECTURES", rocm_archs))
return args