From a12bc660d8ccd14328acd20936e8b921f9791b9c Mon Sep 17 00:00:00 2001 From: Georgi Mirazchiyski Date: Fri, 2 Feb 2024 16:25:33 +0000 Subject: [PATCH] [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. --- source/adapters/cuda/enqueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/adapters/cuda/enqueue.cpp b/source/adapters/cuda/enqueue.cpp index 5046f4c865..b2630a8f97 100644 --- a/source/adapters/cuda/enqueue.cpp +++ b/source/adapters/cuda/enqueue.cpp @@ -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,