Skip to content

Commit da04d13

Browse files
committed
[L0]: Fix Out Event in Enqueue Wait Events to prevent reuse
- Fix Out Event created in Enqueue Wait Events to ensure the event is not reused. - Removed completion logic that was allowing caching of the event. - event_handle_t zeEventDestroy handles the memory leak issue that this branch was attempting to fix. Signed-off-by: Neil R. Spruit <[email protected]>
1 parent a3d36c1 commit da04d13

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

source/adapters/level_zero/event.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ ur_result_t urEnqueueEventsWait(
145145
std::unique_lock<ur_shared_mutex> Lock(Queue->Mutex);
146146
resetCommandLists(Queue);
147147
}
148-
if (OutEvent && (*OutEvent)->Completed) {
149-
UR_CALL(CleanupCompletedEvent((*OutEvent), false, false));
150-
UR_CALL(urEventReleaseInternal((*OutEvent)));
151-
}
152148

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

800796
ze_event_handle_t ZeHostVisibleEvent;
801797
if (auto Res = Event->getOrCreateHostVisibleEvent(ZeHostVisibleEvent))

0 commit comments

Comments
 (0)