diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-15 20:31:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-15 20:31:48 +0300 |
commit | bc8bd87dfffe44cd5b9053800f086704ff880f6a (patch) | |
tree | d7ddf4bab0c5a953a6d0d4672f3d1d4c64c38a35 | |
parent | 5051e580e4028e0a741e6519e469321a7e1f2a71 (diff) | |
parent | 65d95879f73951861a90efe1c3ac5d1d03530fd6 (diff) |
Merge branch 'blender2.7'
-rw-r--r-- | build_files/buildbot/slave_compile.py | 17 | ||||
-rw-r--r-- | build_files/cmake/config/blender_release.cmake | 5 | ||||
-rw-r--r-- | intern/cycles/CMakeLists.txt | 2 | ||||
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 7 | ||||
-rw-r--r-- | intern/cycles/blender/addon/version_update.py | 2 | ||||
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/CMakeLists.txt | 28 |
7 files changed, 20 insertions, 45 deletions
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index 102fbd903e2..7eb6ff5c2cf 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -116,23 +116,6 @@ if 'cmake' in builder: cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7", "-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"]) - # Workaround to build only sm_7x kernels with CUDA 10, until - # older kernels work well with this version. - if builder.startswith('win'): - cmake_extra_options.append('-DCUDA_VERSION=9.1') - cmake_extra_options.append('-DCUDA_TOOLKIT_INCLUDE:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/include') - cmake_extra_options.append('-DCUDA_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1') - cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/bin/nvcc.exe') - cmake_extra_options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe') - cmake_extra_options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0') - elif builder.startswith('linux'): - cmake_extra_options.append('-DCUDA_VERSION=9.1') - cmake_extra_options.append('-DCUDA_TOOLKIT_INCLDUE:PATH=/usr/local/cuda-9.1/include') - cmake_extra_options.append('-DCUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-9.1') - cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-9.1/bin/nvcc') - cmake_extra_options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-10.0/bin/nvcc') - cmake_extra_options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-10.0') - cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file)) # Prepare CMake options needed to configure cuda binaries compilation, 64bit only. diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 74417ea3151..5c19aaa5ad4 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -50,8 +50,9 @@ set(WITH_SDL ON CACHE BOOL "" FORCE) set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE) set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE) -set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE) -set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) +set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE) +set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) +set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE) set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75 CACHE STRING "" FORCE) # platform dependent options diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 6fe4546ae8c..d4a613a78c7 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -301,6 +301,8 @@ if(WITH_CYCLES_CUDA_BINARIES AND (NOT WITH_CYCLES_CUBIN_COMPILER)) set(MAX_MSVC 1911) elseif(${CUDA_VERSION} EQUAL "10.0") set(MAX_MSVC 1999) + elseif(${CUDA_VERSION} EQUAL "10.1") + set(MAX_MSVC 1999) endif() if(NOT MSVC_VERSION LESS ${MAX_MSVC} OR CMAKE_C_COMPILER_ID MATCHES "Clang") message(STATUS "nvcc not supported for this compiler version, using cycles_cubin_cc instead.") diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index c6777bb32bf..ae07bcd38fe 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1453,10 +1453,11 @@ class CyclesPreferences(bpy.types.AddonPreferences): # Update name in case it changed entry.name = device[0] - def get_devices(self): + # Gets all devices types by default. + def get_devices(self, compute_device_type=''): import _cycles # Layout of the device tuples: (Name, Type, Persistent ID) - device_list = _cycles.available_devices(self.compute_device_type) + device_list = _cycles.available_devices(compute_device_type) # Make sure device entries are up to date and not referenced before # we know we don't add new devices. This way we guarantee to not # hold pointers to a resized array. @@ -1513,7 +1514,7 @@ class CyclesPreferences(bpy.types.AddonPreferences): row = layout.row() row.prop(self, "compute_device_type", expand=True) - cuda_devices, opencl_devices = self.get_devices() + cuda_devices, opencl_devices = self.get_devices(self.compute_device_type) row = layout.row() if self.compute_device_type == 'CUDA': self._draw_devices(row, 'CUDA', cuda_devices) diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py index 76731e1f05a..664a6a913ba 100644 --- a/intern/cycles/blender/addon/version_update.py +++ b/intern/cycles/blender/addon/version_update.py @@ -253,7 +253,7 @@ def do_versions(self): pass # Init device list for UI - prop.get_devices() + prop.get_devices(prop.compute_device_type) # We don't modify startup file because it assumes to # have all the default values only. diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index ada538adf32..f8c6aa5cd33 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -400,9 +400,9 @@ public: major, minor); return false; } - else if(cuda_version != 80) { + else if(cuda_version != 101) { printf("CUDA version %d.%d detected, build may succeed but only " - "CUDA 8.0 is officially supported.\n", + "CUDA 10.1 is officially supported.\n", major, minor); } return true; 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 |