Skip to content

Commit 78a71f3

Browse files
author
Georgi Mirazchiyski
committed
[CUDA] Use appropriate return code for out of registers kernel launch
Change the returned error code for exiting the kernel launch entry point in CUDA when exceeding the maximum available registers for execution on the SM. Previously we were returning a misleading error code.
1 parent 0c0f48d commit 78a71f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/adapters/cuda/enqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ setKernelParams(const ur_context_handle_t Context,
237237

238238
if (hasExceededMaxRegistersPerBlock(Device, Kernel,
239239
KernelLocalWorkGroupSize)) {
240-
return UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE;
240+
return UR_RESULT_ERROR_OUT_OF_RESOURCES;
241241
}
242242
} else {
243243
guessLocalWorkSize(Device, ThreadsPerBlock, GlobalWorkSize, WorkDim,

0 commit comments

Comments
 (0)