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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-05-02 16:03:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-05-02 16:03:51 +0300
commit4384a7cf463eedea83179da80bbe12ff7d55578a (patch)
tree75d663ff30399e595a3f0c5515f790788a41dddd
parent4174e533c001367b0ef391b72baa5b07cb517ce8 (diff)
Cycles: Fix CUDA split kernel
Global size y needs to be a multiple of 16.
-rw-r--r--intern/cycles/device/device_cuda.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index acfb3e1d8f4..a971170318e 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1634,7 +1634,8 @@ int2 CUDASplitKernel::split_kernel_global_size(device_memory& kg, device_memory&
<< string_human_readable_size(free) << ").";
size_t num_elements = max_elements_for_max_buffer_size(kg, data, free / 2);
- int2 global_size = make_int2(round_down((int)sqrt(num_elements), 32), (int)sqrt(num_elements));
+ size_t side = round_down((int)sqrt(num_elements), 32);
+ int2 global_size = make_int2(side, round_down(num_elements / side, 16));
VLOG(1) << "Global size: " << global_size << ".";
return global_size;
}