@@ -1682,28 +1682,25 @@ ur_result_t enqueueWaitEventPath(ur_exp_command_buffer_handle_t CommandBuffer,
16821682 (ZeCopyCommandQueue, 1 , &CommandBuffer->ZeCopyCommandList , nullptr ));
16831683 }
16841684
1685- ZE2UR_CALL (zeCommandListAppendBarrier,
1686- (SignalCommandList->first , nullptr , 1 ,
1687- &(CommandBuffer->ExecutionFinishedEvent ->ZeEvent )));
1688-
16891685 // Reset the wait-event for the UR command-buffer that is signaled when its
16901686 // submission dependencies have been satisfied.
16911687 ZE2UR_CALL (zeCommandListAppendEventReset,
16921688 (SignalCommandList->first , CommandBuffer->WaitEvent ->ZeEvent ));
1693-
16941689 // Reset the all-reset-event for the UR command-buffer that is signaled when
16951690 // all events of the main command-list have been reset.
16961691 ZE2UR_CALL (zeCommandListAppendEventReset,
16971692 (SignalCommandList->first , CommandBuffer->AllResetEvent ->ZeEvent ));
16981693
16991694 if (DoProfiling) {
17001695 UR_CALL (appendProfilingQueries (CommandBuffer, SignalCommandList->first ,
1701- nullptr , nullptr ));
1696+ *Event,
1697+ CommandBuffer->ExecutionFinishedEvent ));
1698+ } else {
1699+ ZE2UR_CALL (zeCommandListAppendBarrier,
1700+ (SignalCommandList->first , (*Event)->ZeEvent , 1 ,
1701+ &(CommandBuffer->ExecutionFinishedEvent ->ZeEvent )));
17021702 }
17031703
1704- ZE2UR_CALL (zeCommandListAppendBarrier,
1705- (SignalCommandList->first , (*Event)->ZeEvent , 0 , nullptr ));
1706-
17071704 UR_CALL (Queue->executeCommandList (SignalCommandList, false /* IsBlocking*/ ,
17081705 false /* OKToBatchCommand*/ ));
17091706
0 commit comments