@@ -88,7 +88,8 @@ ur_result_t urEnqueueEventsWait(
8888 // Get a new command list to be used on this call
8989 ur_command_list_ptr_t CommandList{};
9090 UR_CALL (Queue->Context ->getAvailableCommandList (
91- Queue, CommandList, UseCopyEngine, NumEventsInWaitList, EventWaitList));
91+ Queue, CommandList, UseCopyEngine, NumEventsInWaitList, EventWaitList,
92+ false /* AllowBatching*/ , nullptr /* ForceCmdQueue*/ ));
9293
9394 ze_event_handle_t ZeEvent = nullptr ;
9495 ur_event_handle_t InternalEvent;
@@ -109,7 +110,8 @@ ur_result_t urEnqueueEventsWait(
109110
110111 // Execute command list asynchronously as the event will be used
111112 // to track down its completion.
112- return Queue->executeCommandList (CommandList);
113+ return Queue->executeCommandList (CommandList, false /* IsBlocking*/ ,
114+ false /* OKToBatchCommand*/ );
113115 }
114116
115117 {
@@ -279,13 +281,14 @@ ur_result_t urEnqueueEventsWaitWithBarrier(
279281 ur_command_list_ptr_t CmdList;
280282 UR_CALL (Queue->Context ->getAvailableCommandList (
281283 Queue, CmdList, false /* UseCopyEngine=*/ , NumEventsInWaitList,
282- EventWaitList, OkToBatch));
284+ EventWaitList, OkToBatch, nullptr /* ForcedCmdQueue */ ));
283285
284286 // Insert the barrier into the command-list and execute.
285287 UR_CALL (insertBarrierIntoCmdList (CmdList, TmpWaitList, ResultEvent,
286288 IsInternal));
287289
288- UR_CALL (Queue->executeCommandList (CmdList, false , OkToBatch));
290+ UR_CALL (
291+ Queue->executeCommandList (CmdList, false /* IsBlocking*/ , OkToBatch));
289292
290293 // Because of the dependency between commands in the in-order queue we don't
291294 // need to keep track of any active barriers if we have in-order queue.
@@ -354,7 +357,7 @@ ur_result_t urEnqueueEventsWaitWithBarrier(
354357 ur_command_list_ptr_t CmdList;
355358 UR_CALL (Queue->Context ->getAvailableCommandList (
356359 Queue, CmdList, false /* UseCopyEngine=*/ , NumEventsInWaitList,
357- EventWaitList, OkToBatch));
360+ EventWaitList, OkToBatch, nullptr /* ForcedCmdQueue */ ));
358361 CmdLists.push_back (CmdList);
359362 }
360363
@@ -404,7 +407,8 @@ ur_result_t urEnqueueEventsWaitWithBarrier(
404407 // Only batch if the matching CmdList is already open.
405408 OkToBatch = CommandBatch.OpenCommandList == CmdList;
406409
407- UR_CALL (Queue->executeCommandList (CmdList, false , OkToBatch));
410+ UR_CALL (
411+ Queue->executeCommandList (CmdList, false /* IsBlocking*/ , OkToBatch));
408412 }
409413
410414 UR_CALL (Queue->ActiveBarriers .clear ());
@@ -716,7 +720,7 @@ ur_result_t urEnqueueTimestampRecordingExp(
716720 ur_command_list_ptr_t CommandList{};
717721 UR_CALL (Queue->Context ->getAvailableCommandList (
718722 Queue, CommandList, UseCopyEngine, NumEventsInWaitList, EventWaitList,
719- /* AllowBatching */ false ));
723+ /* AllowBatching */ false , nullptr /* ForcedCmdQueue */ ));
720724
721725 UR_CALL (createEventAndAssociateQueue (
722726 Queue, OutEvent, UR_COMMAND_TIMESTAMP_RECORDING_EXP, CommandList,
@@ -740,7 +744,7 @@ ur_result_t urEnqueueTimestampRecordingExp(
740744 (*OutEvent)->WaitList .ZeEventList ));
741745
742746 UR_CALL (
743- Queue->executeCommandList (CommandList, Blocking, /* OkToBatch */ false ));
747+ Queue->executeCommandList (CommandList, Blocking, false /* OkToBatch */ ));
744748
745749 return UR_RESULT_SUCCESS;
746750}
@@ -816,7 +820,9 @@ urEventWait(uint32_t NumEvents, ///< [in] number of events in the event list
816820 else {
817821 // NOTE: we are cleaning up after the event here to free resources
818822 // sooner in case run-time is not calling urEventRelease soon enough.
819- CleanupCompletedEvent (reinterpret_cast <ur_event_handle_t >(Event));
823+ CleanupCompletedEvent (reinterpret_cast <ur_event_handle_t >(Event),
824+ false /* QueueLocked*/ ,
825+ false /* SetEventCompleted*/ );
820826 // For the case when we have out-of-order queue or regular command
821827 // lists its more efficient to check fences so put the queue in the
822828 // set to cleanup later.
@@ -884,7 +890,10 @@ ur_result_t urExtEventCreate(
884890 ur_event_handle_t
885891 *Event // /< [out] pointer to the handle of the event object created.
886892) {
887- UR_CALL (EventCreate (Context, nullptr , false , true , Event));
893+ UR_CALL (EventCreate (Context, nullptr /* Queue*/ , false /* IsMultiDevice*/ ,
894+ true /* HostVisible*/ , Event,
895+ false /* CounterBasedEventEnabled*/ ,
896+ false /* ForceDisableProfiling*/ ));
888897
889898 (*Event)->RefCountExternal ++;
890899 if (!(*Event)->CounterBasedEventsEnabled )
@@ -903,7 +912,10 @@ ur_result_t urEventCreateWithNativeHandle(
903912 // we dont have urEventCreate, so use this check for now to know that
904913 // the call comes from urEventCreate()
905914 if (reinterpret_cast <ze_event_handle_t >(NativeEvent) == nullptr ) {
906- UR_CALL (EventCreate (Context, nullptr , false , true , Event));
915+ UR_CALL (EventCreate (Context, nullptr /* Queue*/ , false /* IsMultiDevice*/ ,
916+ true /* HostVisible*/ , Event,
917+ false /* CounterBasedEventEnabled*/ ,
918+ false /* ForceDisableProfiling*/ ));
907919
908920 (*Event)->RefCountExternal ++;
909921 if (!(*Event)->CounterBasedEventsEnabled )
@@ -983,7 +995,8 @@ ur_result_t ur_event_handle_t_::getOrCreateHostVisibleEvent(
983995
984996 ur_command_list_ptr_t CommandList{};
985997 UR_CALL (UrQueue->Context ->getAvailableCommandList (
986- UrQueue, CommandList, false /* UseCopyEngine */ , 0 , nullptr , OkToBatch))
998+ UrQueue, CommandList, false /* UseCopyEngine */ , 0 , nullptr , OkToBatch,
999+ nullptr /* ForcedCmdQueue*/ ))
9871000
9881001 // Create a "proxy" host-visible event.
9891002 UR_CALL (createEventAndAssociateQueue (
@@ -1529,7 +1542,8 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
15291542 // This prevents a potential deadlock with recursive
15301543 // event locks.
15311544 UR_CALL (Queue->Context ->getAvailableCommandList (
1532- Queue, CommandList, false , 0 , nullptr , true ));
1545+ Queue, CommandList, false /* UseCopyEngine*/ , 0 , nullptr ,
1546+ true /* AllowBatching*/ , nullptr /* ForcedCmdQueue*/ ));
15331547 }
15341548
15351549 std::shared_lock<ur_shared_mutex> Lock (EventList[I]->Mutex );
0 commit comments