[Bf-blender-cvs] [8d02177ab07] blender-v2.83-release: Fix Cycles CUDA kernels for Ampere not building with CUDA 11

Brecht Van Lommel noreply at git.blender.org
Mon Feb 8 16:50:13 CET 2021


Commit: 8d02177ab079eec518685d60f5e0d9e146de97cb
Author: Brecht Van Lommel
Date:   Wed Sep 30 18:26:41 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB8d02177ab079eec518685d60f5e0d9e146de97cb

Fix Cycles CUDA kernels for Ampere not building with CUDA 11

Running Blender on Ampere cards was already possible with ptx, this fix is
needed to support building CUDA binaries.

Note the CUDA version used for official Blender builds is still 10, this is
merely the change to make it possible for those using CUDA 11 and specifying
the sm_8x kernels to be compiled.

Found by Milan Jaros.

===================================================================

M	intern/cycles/kernel/kernels/cuda/kernel_config.h

===================================================================

diff --git a/intern/cycles/kernel/kernels/cuda/kernel_config.h b/intern/cycles/kernel/kernels/cuda/kernel_config.h
index 3ec00762e72..2e47ce2de6c 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_config.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_config.h
@@ -70,8 +70,8 @@
 #  endif
 #  define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
 
-/* 7.x */
-#elif __CUDA_ARCH__ <= 799
+/* 7.x, 8.x */
+#elif __CUDA_ARCH__ <= 899
 #  define CUDA_MULTIPRESSOR_MAX_REGISTERS 65536
 #  define CUDA_MULTIPROCESSOR_MAX_BLOCKS 32
 #  define CUDA_BLOCK_MAX_THREADS 1024



More information about the Bf-blender-cvs mailing list