Skip to content

Commit

Permalink
Merge pull request #2524 from nrspruit/fix_enqueue_wait_out_event
Browse files Browse the repository at this point in the history
[L0]: Fix Out Event in Enqueue Wait Events to prevent reuse
  • Loading branch information
kbenzie committed Jan 8, 2025
1 parent d0dc3f7 commit 6f5023c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions source/adapters/level_zero/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ ur_result_t urEnqueueEventsWait(
std::unique_lock<ur_shared_mutex> Lock(Queue->Mutex);
resetCommandLists(Queue);
}
if (OutEvent && (*OutEvent)->Completed) {
UR_CALL(CleanupCompletedEvent((*OutEvent), false, false));
UR_CALL(urEventReleaseInternal((*OutEvent)));
}

return UR_RESULT_SUCCESS;
}
Expand Down Expand Up @@ -795,7 +791,7 @@ urEventWait(uint32_t NumEvents, ///< [in] number of events in the event list
//
ur_event_handle_t_ *Event = ur_cast<ur_event_handle_t_ *>(e);
if (!Event->hasExternalRefs())
die("urEventsWait must not be called for an internal event");
die("urEventWait must not be called for an internal event");

ze_event_handle_t ZeHostVisibleEvent;
if (auto Res = Event->getOrCreateHostVisibleEvent(ZeHostVisibleEvent))
Expand Down

0 comments on commit 6f5023c

Please sign in to comment.