Cycles: tweak CUDA messages and avoid build errors with existing sm_2x configs.

This commit is contained in:
Brecht Van Lommel 2018-02-06 15:19:25 +01:00
parent 1dcd7db73d
commit fee4b646c4
3 changed files with 10 additions and 5 deletions

@ -126,7 +126,8 @@ if(WITH_CYCLES_CUBIN_COMPILER)
# though we are building 32 bit blender a 64 bit cubin_cc will have
# to be build to compile the cubins.
if(MSVC AND NOT CMAKE_CL_64)
Message("cycles_cubin_cc not supported on x86")
message("Building with CUDA not supported on 32 bit, skipped")
set(WITH_CYCLES_CUDA_BINARIES OFF)
else()
set(SRC
cycles_cubin_cc.cpp

@ -2479,7 +2479,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, num);
if(major < 3) {
VLOG(1) << "Ignoring device \"" << name
<< "\", compute capability is too low.";
<< "\", this graphics card is no longer supported.";
continue;
}

@ -416,9 +416,13 @@ if(WITH_CYCLES_CUDA_BINARIES)
endmacro()
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
# Compile regular kernel
CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
if(${arch} MATCHES "sm_2.")
message(STATUS "CUDA binaries for ${arch} are no longer supported, skipped.")
else()
# Compile regular kernel
CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
endif()
if(WITH_CYCLES_CUDA_SPLIT_KERNEL_BINARIES)
# Compile split kernel