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:
authorXavier Hallade <xavier.hallade@intel.com>2022-06-29 10:47:53 +0300
committerXavier Hallade <xavier.hallade@intel.com>2022-06-29 10:47:55 +0300
commit55bad7dd451ef74b6788804cb0cf3d289b673cc7 (patch)
treec5fb525e5d29020708adc1e33e5a03e29016e434
parent83258b5c9f082467b463c63e8b5ed64c3aa13b4d (diff)
Cleanup: add comment to work group count adjustment
and move active path array kernel local size adjustment closer to oneapi_kernel_preferred_local_size call.
-rw-r--r--intern/cycles/kernel/device/oneapi/kernel.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/intern/cycles/kernel/device/oneapi/kernel.cpp b/intern/cycles/kernel/device/oneapi/kernel.cpp
index 9a10cb52629..62affe6e58e 100644
--- a/intern/cycles/kernel/device/oneapi/kernel.cpp
+++ b/intern/cycles/kernel/device/oneapi/kernel.cpp
@@ -311,6 +311,13 @@ bool oneapi_enqueue_kernel(KernelContext *kernel_context,
kernel_context->queue, device_kernel, global_size);
assert(global_size % local_size == 0);
+ /* Local size for DEVICE_KERNEL_INTEGRATOR_ACTIVE_PATHS_ARRAY needs to be enforced so we
+ * overwrite it outside of oneapi_kernel_preferred_local_size. */
+ if (device_kernel == DEVICE_KERNEL_INTEGRATOR_ACTIVE_PATHS_ARRAY) {
+ local_size = GPU_PARALLEL_ACTIVE_INDEX_DEFAULT_BLOCK_SIZE;
+ }
+
+ /* Kernels listed below need a specific number of work groups. */
if (device_kernel == DEVICE_KERNEL_INTEGRATOR_ACTIVE_PATHS_ARRAY ||
device_kernel == DEVICE_KERNEL_INTEGRATOR_QUEUED_PATHS_ARRAY ||
device_kernel == DEVICE_KERNEL_INTEGRATOR_QUEUED_SHADOW_PATHS_ARRAY ||
@@ -321,13 +328,10 @@ bool oneapi_enqueue_kernel(KernelContext *kernel_context,
int num_states = *((int *)(args[0]));
/* Round up to the next work-group. */
size_t groups_count = (num_states + local_size - 1) / local_size;
- /* NOTE(@nsirgien): Because for now non-uniform workgroups don't work on most of
- oneAPI devices,here ise xtending of work size to match uniform requirements */
+ /* NOTE(@nsirgien): As for now non-uniform workgroups don't work on most oneAPI devices, we
+ * extend work size to fit uniformity requirements. */
global_size = groups_count * local_size;
- if (device_kernel == DEVICE_KERNEL_INTEGRATOR_ACTIVE_PATHS_ARRAY) {
- local_size = GPU_PARALLEL_ACTIVE_INDEX_DEFAULT_BLOCK_SIZE;
- }
# ifdef WITH_ONEAPI_SYCL_HOST_ENABLED
if (queue->get_device().is_host()) {
global_size = 1;