Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-15 16:18:22 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-15 18:52:28 +0300
commit65d95879f73951861a90efe1c3ac5d1d03530fd6 (patch)
tree33f40dfe8010f056b1073b305be4c9eca09d4781 /intern/cycles/kernel
parent56a8c2a3203482f0fc7437b0cefe2160e27f7fe3 (diff)
Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both 9.1 and 10.0 for different cards. There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the regression tests, so that remains disabled same as it was for CUDA 10.0. Fix T59286: CUDA bake failing on some cards. Fix T56858: CUDA 9.2 and 10 issues.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/CMakeLists.txt28
1 files changed, 8 insertions, 20 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index a35eb102c9c..822ce68bdc8 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -346,11 +346,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
# warn for other versions
- if(CUDA_VERSION MATCHES "90" OR CUDA_VERSION MATCHES "91" OR CUDA_VERSION MATCHES "100")
+ if(CUDA_VERSION MATCHES "101")
else()
message(WARNING
"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
- "build may succeed but only CUDA 9.0, 9.1 and 10.0 are officially supported")
+ "build may succeed but only CUDA 10.1 is officially supported")
endif()
# build for each arch
@@ -400,29 +400,17 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(cuda_flags ${cuda_flags} -D __KERNEL_DEBUG__)
endif()
- # Workaround to build only sm_7x kernels with CUDA 10, until
- # older kernels work well with this version.
- if(DEFINED CUDA10_NVCC_EXECUTABLE AND (${arch} MATCHES "sm_7."))
- set(with_cubin_compiler OFF)
- set(cuda_nvcc_executable "${CUDA10_NVCC_EXECUTABLE}")
- set(cuda_toolkit_root_dir "${CUDA10_TOOLKIT_ROOT_DIR}")
- else()
- set(with_cubin_compiler ${WITH_CYCLES_CUBIN_COMPILER})
- set(cuda_nvcc_executable "${CUDA_NVCC_EXECUTABLE}")
- set(cuda_toolkit_root_dir "${CUDA_TOOLKIT_ROOT_DIR}")
- endif()
-
- if(with_cubin_compiler)
+ if(WITH_CYCLES_CUBIN_COMPILER)
string(SUBSTRING ${arch} 3 -1 CUDA_ARCH)
# Needed to find libnvrtc-builtins.so. Can't do it from inside
# cycles_cubin_cc since the env variable is read before main()
if(APPLE)
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
- -E env DYLD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib")
+ -E env DYLD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib")
elseif(UNIX)
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
- -E env LD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib64")
+ -E env LD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib64")
endif()
add_custom_command(
@@ -433,12 +421,12 @@ if(WITH_CYCLES_CUDA_BINARIES)
-i ${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
${cuda_flags}
-v
- -cuda-toolkit-dir "${cuda_toolkit_root_dir}"
+ -cuda-toolkit-dir "${CUDA_TOOLKIT_ROOT_DIR}"
DEPENDS ${kernel_sources} cycles_cubin_cc)
else()
add_custom_command(
OUTPUT ${cuda_cubin}
- COMMAND ${cuda_nvcc_executable}
+ COMMAND ${CUDA_NVCC_EXECUTABLE}
-arch=${arch}
${CUDA_NVCC_FLAGS}
--cubin
@@ -457,7 +445,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
if(${arch} MATCHES "sm_2.")
message(STATUS "CUDA binaries for ${arch} are no longer supported, skipped.")
- elseif(${arch} MATCHES "sm_7." AND (${CUDA_VERSION} LESS 100) AND (NOT DEFINED CUDA10_NVCC_EXECUTABLE))
+ elseif(${arch} MATCHES "sm_7." AND ${CUDA_VERSION} LESS 100)
message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.")
else()
# Compile regular kernel