Skip to content
Merged
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
11 changes: 11 additions & 0 deletions unified-runtime/source/adapters/offload/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo(ur_event_handle_t hEvent,
return ReturnValue(hEvent->Type);
case UR_EVENT_INFO_REFERENCE_COUNT:
return ReturnValue(hEvent->RefCount.load());
case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: {
bool Complete;
OL_RETURN_ON_ERR(olGetEventInfo(hEvent->OffloadEvent,
OL_EVENT_INFO_IS_COMPLETE, sizeof(Complete),
&Complete));
if (Complete) {
return ReturnValue(UR_EVENT_STATUS_COMPLETE);
} else {
return ReturnValue(UR_EVENT_STATUS_QUEUED);
}
}
default:
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}
Expand Down