summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2021-06-02 01:02:23 -0700
committerGitHub <noreply@github.com>2021-06-02 10:02:23 +0200
commit3356c5fc71d08c44e4fb8f23cc0e6f2c3e93567b (patch)
treecede928c1bed52dc660e4fb40ef2460fa8b9187f /var
parent622223823edd27befc9ab96abb001e77b415c8ae (diff)
downloadspack-3356c5fc71d08c44e4fb8f23cc0e6f2c3e93567b.tar.gz
spack-3356c5fc71d08c44e4fb8f23cc0e6f2c3e93567b.tar.bz2
spack-3356c5fc71d08c44e4fb8f23cc0e6f2c3e93567b.tar.xz
spack-3356c5fc71d08c44e4fb8f23cc0e6f2c3e93567b.zip
lbann, aluminum, hydrogen, dihydrogen: pass cuda_arch to cmake (#24074)
Diffstat (limited to 'var')
-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(