Skip to content

Commit 8bfe4e0

Browse files
authored
[UR][Offload] Don't try to getEventInfo on a null event (#20140)
Null events are created by the UR Offload adapter to represent tasks which are already complete. As they have no liboffload event associated with them, don't try to call out to liboffload during `olEventGetInfo`.
1 parent fb8d4ab commit 8bfe4e0

File tree

1 file changed

+4
-0
lines changed
  • unified-runtime/source/adapters/offload

1 file changed

+4
-0
lines changed

unified-runtime/source/adapters/offload/event.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo(ur_event_handle_t hEvent,
3232
case UR_EVENT_INFO_REFERENCE_COUNT:
3333
return ReturnValue(hEvent->RefCount.load());
3434
case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: {
35+
if (!hEvent->OffloadEvent) {
36+
return ReturnValue(UR_EVENT_STATUS_COMPLETE);
37+
}
38+
3539
bool Complete;
3640
OL_RETURN_ON_ERR(olGetEventInfo(hEvent->OffloadEvent,
3741
OL_EVENT_INFO_IS_COMPLETE, sizeof(Complete),

0 commit comments

Comments
 (0)