Skip to content

Commit 3cb06cb

Browse files
committed
Add missing mapping for CL_INVALID_KERNEL to UR OpenCL adapter and add UR_RESULT_ERROR_INVALID_KERNEL_DEFINITION to spec.
1 parent 1dee646 commit 3cb06cb

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

unified-runtime/include/ur_api.h

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/include/ur_print.hpp

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/scripts/core/common.yml

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ etors:
284284
desc: "Device in question has `$X_DEVICE_INFO_AVAILABLE == false`"
285285
- name: ERROR_INVALID_SPEC_ID
286286
desc: "A specialization constant identifier is not valid."
287+
- name: ERROR_INVALID_KERNEL_DEFINITION
288+
desc: "Incorrect number of arguments, or argument types"
287289
- name: ERROR_UNKNOWN
288290
value: "0x7ffffffe"
289291
desc: "Unknown or internal error"

unified-runtime/source/adapters/opencl/common.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ ur_result_t mapCLErrorToUR(cl_int Result) {
9393
return UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE;
9494
case CL_INVALID_SPEC_ID:
9595
return UR_RESULT_ERROR_INVALID_SPEC_ID;
96+
case CL_INVALID_KERNEL:
97+
return UR_RESULT_ERROR_INVALID_KERNEL;
98+
case CL_INVALID_KERNEL_DEFINITION:
99+
return UR_RESULT_ERROR_INVALID_KERNEL_DEFINITION;
96100
default:
97101
return UR_RESULT_ERROR_UNKNOWN;
98102
}

0 commit comments

Comments
 (0)