We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af4f331 + 21bf4be commit b487b62Copy full SHA for b487b62
source/adapters/level_zero/event.cpp
@@ -887,7 +887,14 @@ ur_result_t
887
888
urEventRelease(/** [in] handle of the event object */ ur_event_handle_t Event) {
889
Event->RefCountExternal--;
890
+ bool isEventsWaitCompleted =
891
+ Event->CommandType == UR_COMMAND_EVENTS_WAIT && Event->Completed;
892
UR_CALL(urEventReleaseInternal(Event));
893
+ // If this is a Completed Event Wait Out Event, then we need to cleanup the
894
+ // event at user release and not at the time of completion.
895
+ if (isEventsWaitCompleted) {
896
+ UR_CALL(CleanupCompletedEvent((Event), false, false));
897
+ }
898
899
return UR_RESULT_SUCCESS;
900
}
0 commit comments