MAGMA: add patch to build with CUDA sm_37 (#24442)
This commit is contained in:
parent
c9932b2d1e
commit
31e6967c49
@ -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
|
||||
|
27
var/spack/repos/builtin/packages/magma/sm_37.patch
Normal file
27
var/spack/repos/builtin/packages/magma/sm_37.patch
Normal file
@ -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 )
|
Loading…
Reference in New Issue
Block a user