We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b0306 commit 7764648Copy full SHA for 7764648
sycl/plugins/cuda/pi_cuda.cpp
@@ -1788,6 +1788,19 @@ pi_result cuda_piEnqueueKernelLaunch(
1788
}
1789
1790
1791
+ size_t maxThreadsPerBlock[3] = {};
1792
+ retError = cuda_piDeviceGetInfo(command_queue->device_,
1793
+ PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES,
1794
+ sizeof(maxThreadsPerBlock),
1795
+ maxThreadsPerBlock, nullptr);
1796
+ assert(retError == PI_SUCCESS);
1797
+
1798
+ for (size_t i = 0; i < work_dim; i++) {
1799
+ if(size_t(threadsPerBlock[i]) > maxThreadsPerBlock[i]) {
1800
+ return PI_INVALID_WORK_GROUP_SIZE;
1801
+ }
1802
1803
1804
int blocksPerGrid[3] = { 1, 1, 1 };
1805
1806
for (size_t i = 0; i < work_dim; i++) {
0 commit comments