@@ -672,12 +672,12 @@ ur_result_t createMainCommandList(ur_context_handle_t Context,
672
672
}
673
673
674
674
/* *
675
- * Waits for any ongoing executions of the command-buffer to finish.
675
+ * Waits for any ongoing executions of the command-buffer to finish
676
676
* @param CommandBuffer The command-buffer to wait for.
677
677
* @return UR_RESULT_SUCCESS or an error code on failure
678
678
*/
679
679
ur_result_t
680
- waitForLastSubmission (ur_exp_command_buffer_handle_t CommandBuffer) {
680
+ waitForOngoingExecution (ur_exp_command_buffer_handle_t CommandBuffer) {
681
681
682
682
if (ur_event_handle_t &CurrentSubmissionEvent =
683
683
CommandBuffer->CurrentSubmissionEvent ) {
@@ -690,30 +690,6 @@ waitForLastSubmission(ur_exp_command_buffer_handle_t CommandBuffer) {
690
690
return UR_RESULT_SUCCESS;
691
691
}
692
692
693
- /* *
694
- * Waits for any ongoing executions of the command-buffer to finish
695
- * but put fence in case of wait event path.
696
- * @param CommandBuffer The command-buffer to wait for.
697
- * @return UR_RESULT_SUCCESS or an error code on failure
698
- */
699
- ur_result_t
700
- waitForOngoingExecution (ur_exp_command_buffer_handle_t CommandBuffer) {
701
-
702
- if (CommandBuffer->UseImmediateAppendPath ) {
703
- if (ur_event_handle_t &CurrentSubmissionEvent =
704
- CommandBuffer->CurrentSubmissionEvent ) {
705
- ZE2UR_CALL (zeEventHostSynchronize,
706
- (CurrentSubmissionEvent->ZeEvent , UINT64_MAX));
707
- UR_CALL (urEventReleaseInternal (CurrentSubmissionEvent));
708
- CurrentSubmissionEvent = nullptr ;
709
- }
710
- } else if (ze_fence_handle_t &ZeFence = CommandBuffer->ZeActiveFence ) {
711
- ZE2UR_CALL (zeFenceHostSynchronize, (ZeFence, UINT64_MAX));
712
- }
713
-
714
- return UR_RESULT_SUCCESS;
715
- }
716
-
717
693
/* *
718
694
* Checks whether the command-buffer can be constructed using in order
719
695
* command-lists.
@@ -1767,7 +1743,7 @@ ur_result_t urEnqueueCommandBufferExp(
1767
1743
1768
1744
std::scoped_lock<ur_shared_mutex> Lock (UrQueue->Mutex );
1769
1745
1770
- UR_CALL (waitForLastSubmission (CommandBuffer));
1746
+ UR_CALL (waitForOngoingExecution (CommandBuffer));
1771
1747
1772
1748
const bool IsInternal = (Event == nullptr );
1773
1749
const bool DoProfiling =
0 commit comments