summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-06-21 22:18:26 -0500
committerGitHub <noreply@github.com>2021-06-21 20:18:26 -0700
commit31e6967c491cc8621004cd9519316a1c06392a7a (patch)
treef7993f3863bc91a7915ad2758792fec9de54bbae /var
parentc9932b2d1e7cfd54238eb462683aa2a18f26a52c (diff)
downloadspack-31e6967c491cc8621004cd9519316a1c06392a7a.tar.gz
spack-31e6967c491cc8621004cd9519316a1c06392a7a.tar.bz2
spack-31e6967c491cc8621004cd9519316a1c06392a7a.tar.xz
spack-31e6967c491cc8621004cd9519316a1c06392a7a.zip
MAGMA: add patch to build with CUDA sm_37 (#24442)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/magma/package.py1
-rw-r--r--var/spack/repos/builtin/packages/magma/sm_37.patch27
2 files changed, 28 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py
index 806398075a..1ad0fb1fd8 100644
--- a/var/spack/repos/builtin/packages/magma/package.py
+++ b/var/spack/repos/builtin/packages/magma/package.py
@@ -55,6 +55,7 @@ class Magma(CMakePackage, CudaPackage):
patch('magma-2.5.0.patch', when='@2.5.0')
patch('magma-2.5.0-cmake.patch', when='@2.5.0')
patch('cmake-W.patch', when='@2.5.0:%nvhpc')
+ patch('sm_37.patch', when='@2.5.4 cuda_arch=37')
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/magma/sm_37.patch b/var/spack/repos/builtin/packages/magma/sm_37.patch
new file mode 100644
index 0000000000..0d7eaf0dce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magma/sm_37.patch
@@ -0,0 +1,27 @@
+--- a/CMakeLists.txt 2021-06-19 15:53:21.028881552 +0000
++++ b/CMakeLists.txt 2021-06-19 15:54:09.204228276 +0000
+@@ -132,7 +132,7 @@
+ endif()
+
+ if (GPU_TARGET MATCHES Kepler)
+- set( GPU_TARGET "${GPU_TARGET} sm_30 sm_35" )
++ set( GPU_TARGET "${GPU_TARGET} sm_30 sm_35 sm_37" )
+ endif()
+
+ if (GPU_TARGET MATCHES Maxwell)
+@@ -182,6 +182,15 @@
+ message( STATUS " compile for CUDA arch 3.5 (Kepler)" )
+ endif()
+
++ if (GPU_TARGET MATCHES sm_37)
++ if (NOT MIN_ARCH)
++ set( MIN_ARCH 300 )
++ endif()
++ set( NV_SM ${NV_SM} -gencode arch=compute_37,code=sm_37 )
++ set( NV_COMP -gencode arch=compute_37,code=compute_37 )
++ message( STATUS " compile for CUDA arch 3.7 (Kepler)" )
++ endif()
++
+ if (GPU_TARGET MATCHES sm_50)
+ if (NOT MIN_ARCH)
+ set( MIN_ARCH 500 )