Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.
Fermi code in Cycles kernel and texture system are coming next.
This commit is contained in:
@@ -409,7 +409,7 @@ option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
|
|||||||
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
|
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
|
||||||
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
|
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
|
||||||
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
|
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
|
||||||
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 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 CACHE STRING "CUDA architectures to build binaries for")
|
||||||
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
|
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
|
||||||
unset(PLATFORM_DEFAULT)
|
unset(PLATFORM_DEFAULT)
|
||||||
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
||||||
|
@@ -54,7 +54,7 @@ set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
|||||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||||
set(CYCLES_CUDA_BINARIES_ARCH sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
|
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
|
||||||
|
|
||||||
# platform dependent options
|
# platform dependent options
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
|
@@ -322,9 +322,9 @@ public:
|
|||||||
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cuDevId);
|
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cuDevId);
|
||||||
cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, cuDevId);
|
cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, cuDevId);
|
||||||
|
|
||||||
/* We only support sm_20 and above */
|
/* We only support sm_30 and above */
|
||||||
if(major < 2) {
|
if(major < 3) {
|
||||||
cuda_error_message(string_printf("CUDA device supported only with compute capability 2.0 or up, found %d.%d.", major, minor));
|
cuda_error_message(string_printf("CUDA device supported only with compute capability 3.0 or up, found %d.%d.", major, minor));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,9 +462,9 @@ public:
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if(have_precompiled_kernels()) {
|
if(have_precompiled_kernels()) {
|
||||||
if(major < 2) {
|
if(major < 3) {
|
||||||
cuda_error_message(string_printf(
|
cuda_error_message(string_printf(
|
||||||
"CUDA device requires compute capability 2.0 or up, "
|
"CUDA device requires compute capability 3.0 or up, "
|
||||||
"found %d.%d. Your GPU is not supported.",
|
"found %d.%d. Your GPU is not supported.",
|
||||||
major, minor));
|
major, minor));
|
||||||
}
|
}
|
||||||
@@ -2532,7 +2532,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
|
|||||||
|
|
||||||
int major;
|
int major;
|
||||||
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, num);
|
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, num);
|
||||||
if(major < 2) {
|
if(major < 3) {
|
||||||
VLOG(1) << "Ignoring device \"" << name
|
VLOG(1) << "Ignoring device \"" << name
|
||||||
<< "\", compute capability is too low.";
|
<< "\", compute capability is too low.";
|
||||||
continue;
|
continue;
|
||||||
@@ -2544,7 +2544,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
|
|||||||
info.description = string(name);
|
info.description = string(name);
|
||||||
info.num = num;
|
info.num = num;
|
||||||
|
|
||||||
info.advanced_shading = (major >= 2);
|
info.advanced_shading = (major >= 3);
|
||||||
info.has_fermi_limits = !(major >= 3);
|
info.has_fermi_limits = !(major >= 3);
|
||||||
info.has_half_images = (major >= 3);
|
info.has_half_images = (major >= 3);
|
||||||
info.has_volume_decoupled = false;
|
info.has_volume_decoupled = false;
|
||||||
|
@@ -316,12 +316,8 @@ set(SRC_SPLIT_HEADERS
|
|||||||
# CUDA module
|
# CUDA module
|
||||||
|
|
||||||
if(WITH_CYCLES_CUDA_BINARIES)
|
if(WITH_CYCLES_CUDA_BINARIES)
|
||||||
# 32 bit or 64 bit
|
# 64 bit only
|
||||||
if(CUDA_64_BIT_DEVICE_CODE)
|
|
||||||
set(CUDA_BITS 64)
|
set(CUDA_BITS 64)
|
||||||
else()
|
|
||||||
set(CUDA_BITS 32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# CUDA version
|
# CUDA version
|
||||||
execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
|
execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
|
||||||
@@ -420,9 +416,6 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
|
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
|
||||||
if(CUDA_VERSION GREATER "89" AND ${arch} MATCHES "sm_2.")
|
|
||||||
message(STATUS "CUDA binaries for ${arch} disabled, not supported by CUDA 9.")
|
|
||||||
else()
|
|
||||||
# Compile regular kernel
|
# Compile regular kernel
|
||||||
CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
|
CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
|
||||||
CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
|
CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
|
||||||
@@ -431,7 +424,6 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||||||
# Compile split kernel
|
# Compile split kernel
|
||||||
CYCLES_CUDA_KERNEL_ADD(${arch} kernel_split "-D __SPLIT__" ${cuda_sources} FALSE)
|
CYCLES_CUDA_KERNEL_ADD(${arch} kernel_split "-D __SPLIT__" ${cuda_sources} FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_custom_target(cycles_kernel_cuda ALL DEPENDS ${cuda_cubins})
|
add_custom_target(cycles_kernel_cuda ALL DEPENDS ${cuda_cubins})
|
||||||
|
Reference in New Issue
Block a user