@@ -54,29 +54,27 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueNativeCommandExp(
54
54
(*Event)->WaitList = TmpWaitList;
55
55
56
56
const auto &WaitList = (*Event)->WaitList ;
57
- const auto &ZeCommandList = CommandList->first ;
58
57
if (WaitList.Length ) {
59
58
ZE2UR_CALL (zeCommandListAppendWaitOnEvents,
60
- (ZeCommandList , WaitList.Length , WaitList.ZeEventList ));
59
+ (CommandList-> first , WaitList.Length , WaitList.ZeEventList ));
61
60
}
62
61
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 ));
69
65
70
- // Call interop func which enqueues native async work
71
- pfnNativeEnqueue ( Queue, data) ;
66
+ {
67
+ ScopedCommandList Active{ Queue, CommandList-> first } ;
72
68
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);
77
71
}
78
72
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));
80
78
81
79
UR_CALL (Queue->executeCommandList (CommandList, false ));
82
80
return UR_RESULT_SUCCESS;
0 commit comments