Skip to content

Commit

Permalink
[CUDA] Use appropriate return code for out of registers kernel launch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GeorgeWeb committed Feb 6, 2024
1 parent c0b1f13 commit a12bc66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/adapters/cuda/enqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ setKernelParams(const ur_context_handle_t Context,

if (hasExceededMaxRegistersPerBlock(Device, Kernel,
KernelLocalWorkGroupSize)) {
return UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE;
return UR_RESULT_ERROR_OUT_OF_RESOURCES;
}
} else {
guessLocalWorkSize(Device, ThreadsPerBlock, GlobalWorkSize, WorkDim,
Expand Down

0 comments on commit a12bc66

Please sign in to comment.