Cycles: tweak CUDA messages and avoid build errors with existing sm_2x configs.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 6 Feb 2018 14:19:25 +0000 (15:19 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 17 Feb 2018 23:53:25 +0000 (00:53 +0100)
intern/cycles/app/CMakeLists.txt
intern/cycles/device/device_cuda.cpp
intern/cycles/kernel/CMakeLists.txt

index a8e0297aeaa22a9c012ee6be307d00dbb876f4e0..d1f86a5fe7d7457c9ed8b0d83d61831e1e1cf8f5 100644 (file)
@@ -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
index d28080c667a9ec562e4738345e075c1a7fa729ae..5703aa7144eb1d9858e3a6288518a97053f44ee0 100644 (file)
@@ -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;
                }
 
index 4d4b8602c78f7266c105f494cd599fd5c5404928..50ea03a1f8f48a78a7c2a6ab3ea00270a5f5cd06 100644 (file)
@@ -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