@@ -54,29 +54,27 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueNativeCommandExp(
5454 (*Event)->WaitList = TmpWaitList;
5555
5656 const auto &WaitList = (*Event)->WaitList ;
57- const auto &ZeCommandList = CommandList->first ;
5857 if (WaitList.Length ) {
5958 ZE2UR_CALL (zeCommandListAppendWaitOnEvents,
60- (ZeCommandList , WaitList.Length , WaitList.ZeEventList ));
59+ (CommandList-> first , WaitList.Length , WaitList.ZeEventList ));
6160 }
6261
63- if (!isInOrderQueue ()) {
64- UR_CALL (Queue->executeCommandList (CommandList, false , false ));
65- UR_CALL (Queue->Context ->getAvailableCommandList (
66- Queue, CommandList, UseCopyEngine, 0 , nullptr ));
67- }
68- ScopedCommandList Active{Queue, CommandList->first };
62+ UR_CALL (Queue->executeCommandList (CommandList, false , false ));
63+ UR_CALL (Queue->Context ->getAvailableCommandList (Queue, CommandList,
64+ UseCopyEngine, 0 , nullptr ));
6965
70- // Call interop func which enqueues native async work
71- pfnNativeEnqueue ( Queue, data) ;
66+ {
67+ ScopedCommandList Active{ Queue, CommandList-> first } ;
7268
73- if (!isInOrderQueue ()) {
74- UR_CALL (Queue->executeCommandList (CommandList, false , false ));
75- UR_CALL (Queue->Context ->getAvailableCommandList (
76- Queue, CommandList, UseCopyEngine, 0 , nullptr ));
69+ // Call interop func which enqueues native async work
70+ pfnNativeEnqueue (Queue, data);
7771 }
7872
79- ZE2UR_CALL (zeCommandListAppendSignalEvent, (ZeCommandList, ZeEvent));
73+ UR_CALL (Queue->executeCommandList (CommandList, false , false ));
74+ UR_CALL (Queue->Context ->getAvailableCommandList (Queue, CommandList,
75+ UseCopyEngine, 0 , nullptr ));
76+
77+ ZE2UR_CALL (zeCommandListAppendSignalEvent, (CommandList->first , ZeEvent));
8078
8179 UR_CALL (Queue->executeCommandList (CommandList, false ));
8280 return UR_RESULT_SUCCESS;
0 commit comments