Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/kernels/cuda/kernel_config.h')
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel_config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernels/cuda/kernel_config.h b/intern/cycles/kernel/kernels/cuda/kernel_config.h
index 7ae205b7e14..94f59ff38d9 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_config.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_config.h
@@ -73,9 +73,15 @@
/* tunable parameters */
# define CUDA_THREADS_BLOCK_WIDTH 16
-# define CUDA_KERNEL_MAX_REGISTERS 48
+/* CUDA 9.0 seems to cause slowdowns on high-end Pascal cards unless we increase the number of registers */
+# if __CUDACC_VER_MAJOR__ == 9 && __CUDA_ARCH__ >= 600
+# define CUDA_KERNEL_MAX_REGISTERS 64
+# else
+# define CUDA_KERNEL_MAX_REGISTERS 48
+# endif
# define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
+
/* unknown architecture */
#else
# error "Unknown or unsupported CUDA architecture, can't determine launch bounds"