@@ -196,7 +196,9 @@ ur_result_t urEnqueueEventsWaitWithBarrier(
196
196
//
197
197
if (Queue->isInOrderQueue () && InOrderBarrierBySignal &&
198
198
!Queue->isProfilingEnabled ()) {
199
- if (EventWaitList.Length ) {
199
+ // If we are using driver in order lists, then append wait on events
200
+ // is unnecessary and we can signal the event created.
201
+ if (EventWaitList.Length && !CmdList->second .IsInOrderList ) {
200
202
ZE2UR_CALL (zeCommandListAppendWaitOnEvents,
201
203
(CmdList->first , EventWaitList.Length ,
202
204
EventWaitList.ZeEventList ));
@@ -1546,8 +1548,13 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
1546
1548
1547
1549
ZE2UR_CALL (zeCommandListAppendWaitOnEvents,
1548
1550
(ZeCommandList, 1u , &EventList[I]->ZeEvent ));
1549
- if (!MultiDeviceEvent->CounterBasedEventsEnabled )
1551
+ if (!MultiDeviceEvent->CounterBasedEventsEnabled ) {
1550
1552
ZE2UR_CALL (zeEventHostSignal, (MultiDeviceZeEvent));
1553
+ } else {
1554
+ ZE2UR_CALL (zeCommandListAppendSignalEvent,
1555
+ (ZeCommandList, MultiDeviceZeEvent));
1556
+ }
1557
+ MultiDeviceEvent->Completed = true ;
1551
1558
1552
1559
UR_CALL (Queue->executeCommandList (CommandList, /* IsBlocking */ false ,
1553
1560
/* OkToBatchCommand */ true ));
0 commit comments