Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UR_ERROR_DEVICE_NOT_AVAILABLE and appropriate translation for CL. #1485

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ typedef enum ur_result_t {
///< retrieved via the urPlatformGetLastError entry point.
UR_RESULT_ERROR_LAYER_NOT_PRESENT = 68, ///< A requested layer was not found by the loader.
UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS = 69, ///< An event in the provided wait list has ::UR_EVENT_STATUS_ERROR.
UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE = 70, ///< Device in question has `::UR_DEVICE_INFO_AVAILABLE == false`
UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP = 0x1000, ///< Invalid Command-Buffer
UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP = 0x1001, ///< Sync point is not valid for the command-buffer
UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP = 0x1002, ///< Sync point wait list is invalid
Expand Down
3 changes: 3 additions & 0 deletions include/ur_print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) {
case UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS:
os << "UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS";
break;
case UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE:
os << "UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE";
break;
case UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP:
os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP";
break;
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ etors:
desc: "A requested layer was not found by the loader."
- name: ERROR_IN_EVENT_LIST_EXEC_STATUS
desc: "An event in the provided wait list has $X_EVENT_STATUS_ERROR."
- name: ERROR_DEVICE_NOT_AVAILABLE
desc: "Device in question has `$X_DEVICE_INFO_AVAILABLE == false`"
- name: ERROR_UNKNOWN
value: "0x7ffffffe"
desc: "Unknown or internal error"
Expand Down
2 changes: 2 additions & 0 deletions source/adapters/opencl/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ ur_result_t mapCLErrorToUR(cl_int Result) {
return UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP;
case CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST:
return UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS;
case CL_DEVICE_NOT_AVAILABLE:
return UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE;
default:
return UR_RESULT_ERROR_UNKNOWN;
}
Expand Down