@@ -1682,28 +1682,25 @@ ur_result_t enqueueWaitEventPath(ur_exp_command_buffer_handle_t CommandBuffer,
1682
1682
(ZeCopyCommandQueue, 1 , &CommandBuffer->ZeCopyCommandList , nullptr ));
1683
1683
}
1684
1684
1685
- ZE2UR_CALL (zeCommandListAppendBarrier,
1686
- (SignalCommandList->first , nullptr , 1 ,
1687
- &(CommandBuffer->ExecutionFinishedEvent ->ZeEvent )));
1688
-
1689
1685
// Reset the wait-event for the UR command-buffer that is signaled when its
1690
1686
// submission dependencies have been satisfied.
1691
1687
ZE2UR_CALL (zeCommandListAppendEventReset,
1692
1688
(SignalCommandList->first , CommandBuffer->WaitEvent ->ZeEvent ));
1693
-
1694
1689
// Reset the all-reset-event for the UR command-buffer that is signaled when
1695
1690
// all events of the main command-list have been reset.
1696
1691
ZE2UR_CALL (zeCommandListAppendEventReset,
1697
1692
(SignalCommandList->first , CommandBuffer->AllResetEvent ->ZeEvent ));
1698
1693
1699
1694
if (DoProfiling) {
1700
1695
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 )));
1702
1702
}
1703
1703
1704
- ZE2UR_CALL (zeCommandListAppendBarrier,
1705
- (SignalCommandList->first , (*Event)->ZeEvent , 0 , nullptr ));
1706
-
1707
1704
UR_CALL (Queue->executeCommandList (SignalCommandList, false /* IsBlocking*/ ,
1708
1705
false /* OKToBatchCommand*/ ));
1709
1706
0 commit comments