From 7433e8d55828bfb8104cca63b0c71413ee073dd5 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Wed, 3 May 2023 17:37:40 +0200 Subject: [PATCH 1/4] Add the sm_89 arch to the default CUDA binaries Without this, support for newer NVIDIA cards will not be compiled with pre-compiling the CUDA binaries. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93fddfb1d15..e392a5007e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -503,7 +503,7 @@ if(NOT APPLE) mark_as_advanced(WITH_CYCLES_DEVICE_CUDA) option(WITH_CYCLES_CUDA_BINARIES "Build Cycles NVIDIA CUDA binaries" OFF) - set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 compute_75 CACHE STRING "CUDA architectures to build binaries for") + set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75 CACHE STRING "CUDA architectures to build binaries for") option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF) option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON) -- 2.30.2 From 6cafb3a6bf79493fc9bbc318f340a51d69e8596a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 10 May 2023 18:22:33 +0200 Subject: [PATCH 2/4] Point the latest CUDA toolkit to the 12.1.1 The configuration key naming is a bit misleading: it is called cuda11 but from the find_package perspective and some other semantic meaning it actually means the latest cuda. We should consider renaming the option, but it is to be done outside of the scope of this patch. --- build_files/config/pipeline_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 6edc4801bf6..458cd77c016 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -7,7 +7,7 @@ buildbot: cuda10: version: '10.1.243' cuda11: - version: '11.4.1' + version: '12.1.1' hip: version: '5.5.30571' hiprt: -- 2.30.2 From e99549315078ca60315f48bdb74811fff921d082 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 11 May 2023 09:02:22 +0200 Subject: [PATCH 3/4] More correct CUDA configuration Specify both CUDA11 and CUDA12 configurations. --- build_files/config/pipeline_config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 458cd77c016..c7e10a887ec 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -7,6 +7,8 @@ buildbot: cuda10: version: '10.1.243' cuda11: + version: '11.4.1' + cuda12: version: '12.1.1' hip: version: '5.5.30571' -- 2.30.2 From f0a51cc16fc675f8a6b9d8c0ec3b72e5742e039e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 11 May 2023 10:46:56 +0200 Subject: [PATCH 4/4] Prefer using default CUDA for sm_8* Previously, the sm_8* was compiled using provided CUDA11, which does not support sm_89. --- intern/cycles/kernel/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index b22146eaf83..325048c0927 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -540,12 +540,12 @@ if(WITH_CYCLES_CUDA_BINARIES) elseif(${arch} MATCHES ".*_7." AND "${CUDA_VERSION}" LESS 100) message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.") elseif(${arch} MATCHES ".*_8.") - if(DEFINED CUDA11_NVCC_EXECUTABLE) - set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE}) - set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR}) - elseif("${CUDA_VERSION}" GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11 + if("${CUDA_VERSION}" GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11 set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE}) set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR}) + elseif(DEFINED CUDA11_NVCC_EXECUTABLE) + set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE}) + set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR}) else() message(STATUS "CUDA binaries for ${arch} require CUDA 11.1+, skipped.") endif() -- 2.30.2