summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMatt Larsen <mclarsen@users.noreply.github.com>2020-05-01 01:07:12 -0700
committerGitHub <noreply@github.com>2020-05-01 10:07:12 +0200
commit69a0fbd2cbb0774f832b8a37a07542ef57991dbf (patch)
tree74e440ffa6118ba276941aaf8268a8b1c48cf733 /var
parent4f6c4743e318a829c73d7adf4dc2c170e9a9d179 (diff)
downloadspack-69a0fbd2cbb0774f832b8a37a07542ef57991dbf.tar.gz
spack-69a0fbd2cbb0774f832b8a37a07542ef57991dbf.tar.bz2
spack-69a0fbd2cbb0774f832b8a37a07542ef57991dbf.tar.xz
spack-69a0fbd2cbb0774f832b8a37a07542ef57991dbf.zip
raja: add awareness of the cuda architecture (#16377)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index ccb1863444..10a9265257 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -6,7 +6,7 @@
from spack import *
-class Raja(CMakePackage):
+class Raja(CMakePackage, CudaPackage):
"""RAJA Parallel Framework."""
homepage = "http://software.llnl.gov/RAJA/"
@@ -47,4 +47,9 @@ class Raja(CMakePackage):
'-DENABLE_CUDA=On',
'-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)])
+ cuda_value = spec.variants['cuda_arch'].value
+ cuda_arch = cuda_value[0]
+ if cuda_arch is not None:
+ options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch))
+
return options