summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/aluminum/package.py4
-rw-r--r--var/spack/repos/builtin/packages/dihydrogen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hydrogen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lbann/package.py4
4 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py
index 1cb279a90a..3c3cfb1860 100644
--- a/var/spack/repos/builtin/packages/aluminum/package.py
+++ b/var/spack/repos/builtin/packages/aluminum/package.py
@@ -66,6 +66,10 @@ class Aluminum(CMakePackage, CudaPackage, ROCmPackage):
if '+cuda' in spec:
args.append('-DCMAKE_CUDA_STANDARD=14')
+ archs = spec.variants['cuda_arch'].value
+ if archs != 'none':
+ arch_str = ",".join(archs)
+ args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str)
if spec.satisfies('@0.5:'):
args.extend([
diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py
index b7c16facf3..053e98116a 100644
--- a/var/spack/repos/builtin/packages/dihydrogen/package.py
+++ b/var/spack/repos/builtin/packages/dihydrogen/package.py
@@ -156,6 +156,10 @@ class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage):
args.append('-DCMAKE_CUDA_STANDARD=17')
else:
args.append('-DCMAKE_CUDA_STANDARD=14')
+ archs = spec.variants['cuda_arch'].value
+ if archs != 'none':
+ arch_str = ",".join(archs)
+ args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str)
if '+cuda' in spec or '+distconv' in spec:
args.append('-DcuDNN_DIR={0}'.format(
diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py
index 849a76f8e8..5d7460dfca 100644
--- a/var/spack/repos/builtin/packages/hydrogen/package.py
+++ b/var/spack/repos/builtin/packages/hydrogen/package.py
@@ -161,6 +161,10 @@ class Hydrogen(CMakePackage, CudaPackage, ROCmPackage):
if '+cuda' in spec:
args.append('-DCMAKE_CUDA_STANDARD=14')
+ archs = spec.variants['cuda_arch'].value
+ if archs != 'none':
+ arch_str = ",".join(archs)
+ args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str)
if '+rocm' in spec:
args.extend([
diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py
index 0b0ea86045..c1a05bae26 100644
--- a/var/spack/repos/builtin/packages/lbann/package.py
+++ b/var/spack/repos/builtin/packages/lbann/package.py
@@ -316,6 +316,10 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage):
args.append('-DCMAKE_CUDA_STANDARD=17')
else:
args.append('-DCMAKE_CUDA_STANDARD=14')
+ archs = spec.variants['cuda_arch'].value
+ if archs != 'none':
+ arch_str = ",".join(archs)
+ args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str)
if spec.satisfies('@:0.90') or spec.satisfies('@0.95:'):
args.append(