Skip to content

Commit 5e930ae

Browse files
author
Steffen Larsen
committed
[SYCL][CUDA] Reverse max work-group size order
Due to the user defined work-group size being flipped before launching kernels, the reported max work-group size for a device must be reversed correspondingly. Signed-off-by: Steffen Larsen <steffen.larsen@codeplay.com>
1 parent 80b0306 commit 5e930ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,10 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
739739
device->get()) == CUDA_SUCCESS);
740740
cl::sycl::detail::pi::assertion(max_z >= 0);
741741

742-
return_sizes[0] = size_t(max_x);
742+
// Work-group sizes are flipped, so flip the max work-group sizes.
743+
return_sizes[0] = size_t(max_z);
743744
return_sizes[1] = size_t(max_y);
744-
return_sizes[2] = size_t(max_z);
745+
return_sizes[2] = size_t(max_x);
745746
return getInfoArray(max_work_item_dimensions, param_value_size, param_value,
746747
param_value_size_ret, return_sizes);
747748
}

0 commit comments

Comments
 (0)