We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0936073 commit 211a101Copy full SHA for 211a101
source/adapters/level_zero/event.cpp
@@ -881,7 +881,14 @@ ur_result_t
881
urEventRelease(ur_event_handle_t Event ///< [in] handle of the event object
882
) {
883
Event->RefCountExternal--;
884
+ bool isEventsWaitCompleted =
885
+ Event->CommandType == UR_COMMAND_EVENTS_WAIT && Event->Completed;
886
UR_CALL(urEventReleaseInternal(Event));
887
+ // If this is a Completed Event Wait Out Event, then we need to cleanup the
888
+ // event at user release and not at the time of completion.
889
+ if (isEventsWaitCompleted) {
890
+ UR_CALL(CleanupCompletedEvent((Event), false, false));
891
+ }
892
893
return UR_RESULT_SUCCESS;
894
}
0 commit comments