diff options
Diffstat (limited to 'cuda-11.1.patch')
-rw-r--r-- | cuda-11.1.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/cuda-11.1.patch b/cuda-11.1.patch new file mode 100644 index 000000000000..c5f68a5719ab --- /dev/null +++ b/cuda-11.1.patch @@ -0,0 +1,52 @@ +--- cmake/CudaConfig.cmake 2020-10-16 14:43:24.152111622 +0300 ++++ cmake/CudaConfig.cmake 2020-10-16 14:56:02.361337230 +0300 +@@ -17,12 +17,12 @@ + + if(CUDA) + + set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) + +- #Note at present we do not include SM3.5 or SM3.7 since they sometimes show performance +- #regressions over just using SM3.0. ++ #SM8.6 -- not currently used, but should be tested on Cuda 11.1 ++ set(SM86FLAGS -gencode arch=compute_86,code=sm_86) + #SM8.0 = A100 + set(SM80FLAGS -gencode arch=compute_80,code=sm_80) + #SM7.5 = RTX20xx, RTX Titan, T4 and Quadro RTX + set(SM75FLAGS -gencode arch=compute_60,code=sm_75) + #SM7.0 = V100 and Volta Geforce / GTX Ampere? +@@ -37,11 +37,11 @@ + set(SM53FLAGS -gencode arch=compute_53,code=sm_53) + #SM5.2 = GM200 = GTX-Titan-X, M6000 etc. + set(SM52FLAGS -gencode arch=compute_52,code=sm_52) + #SM5.0 = GM204 = GTX980, 970 etc + set(SM50FLAGS -gencode arch=compute_50,code=sm_50) +- #SM3.7 = GK210 = K80 ++ #SM3.7 = GK210 = K80 -- not currently used, since SM3.0 may be better + set(SM37FLAGS -gencode arch=compute_37,code=sm_37) + #SM3.5 = GK110 + 110B = K20, K20X, K40, GTX780, GTX-Titan, GTX-Titan-Black, GTX-Titan-Z + set(SM35FLAGS -gencode arch=compute_35,code=sm_35) + #SM3.0 = GK104 = K10, GTX680, 690 etc. + set(SM30FLAGS -gencode arch=compute_30,code=sm_30) +@@ -67,13 +67,19 @@ + elseif(${CUDA_VERSION} VERSION_EQUAL 11.0) + # Implement the standard compilation rather than a warp-synchronous one, which is deprecated as of CUDA 11 + set(SM70FLAGS -gencode arch=compute_70,code=sm_70) + set(SM75FLAGS -gencode arch=compute_75,code=sm_75) + message(STATUS "Configuring for SM3.5, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0, SM7.5 and SM8.0") +- list(APPEND CUDA_NVCC_FLAGS ${SM35FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} ${SM75FLAGS} ${SM80FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) ++ list(APPEND CUDA_NVCC_FLAGS ${SM35FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} ${SM75FLAGS} ${SM80FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) ++ elseif(${CUDA_VERSION} VERSION_EQUAL 11.1) ++ # Implement the standard compilation rather than a warp-synchronous one, which is deprecated as of CUDA 11 ++ set(SM70FLAGS -gencode arch=compute_70,code=sm_70) ++ set(SM75FLAGS -gencode arch=compute_75,code=sm_75) ++ message(STATUS "Configuring for SM3.5, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0, SM7.5 and SM8.6") ++ list(APPEND CUDA_NVCC_FLAGS ${SM35FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} ${SM75FLAGS} ${SM80FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) + else() +- message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5 and <= 11.0. ++ message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5 and <= 11.1. + Please upgrade your CUDA installation or disable building with CUDA.") + endif() + + set(CUDA_PROPAGATE_HOST_FLAGS FALSE) + |