From 25aaa4169bf600cb4a5b7846d4d69fd1a4506f76 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 7 Jan 2025 10:40:35 +0000 Subject: [PATCH] Merge pull request #2524 from nrspruit/fix_enqueue_wait_out_event [L0]: Fix Out Event in Enqueue Wait Events to prevent reuse --- source/adapters/level_zero/event.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/adapters/level_zero/event.cpp b/source/adapters/level_zero/event.cpp index a854c50fd9..27557919b5 100644 --- a/source/adapters/level_zero/event.cpp +++ b/source/adapters/level_zero/event.cpp @@ -145,10 +145,6 @@ ur_result_t urEnqueueEventsWait( std::unique_lock Lock(Queue->Mutex); resetCommandLists(Queue); } - if (OutEvent && (*OutEvent)->Completed) { - UR_CALL(CleanupCompletedEvent((*OutEvent), false, false)); - UR_CALL(urEventReleaseInternal((*OutEvent))); - } return UR_RESULT_SUCCESS; } @@ -795,7 +791,7 @@ urEventWait(uint32_t NumEvents, ///< [in] number of events in the event list // ur_event_handle_t_ *Event = ur_cast(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))