Skip to content

Commit 92d6c64

Browse files
authored
Merge pull request #2429 from winstonzhang-intel/urlza428
[L0] Fixed getImmCmdList returning cmdlist with wrong properties
2 parents 51f8152 + 70924db commit 92d6c64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/adapters/level_zero/queue.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2398,7 +2398,11 @@ ur_command_list_ptr_t &ur_queue_handle_t_::ur_queue_group_t::getImmCmdList() {
23982398
uint32_t QueueIndex, QueueOrdinal;
23992399
auto Index = getQueueIndex(&QueueOrdinal, &QueueIndex);
24002400

2401-
if (ImmCmdLists[Index] != Queue->CommandListMap.end())
2401+
if ((ImmCmdLists[Index] != Queue->CommandListMap.end()) &&
2402+
(!Queue->CounterBasedEventsEnabled ||
2403+
(Queue->CounterBasedEventsEnabled &&
2404+
(ImmCmdLists[Index]->second.ZeQueueDesc.flags &
2405+
ZE_COMMAND_QUEUE_FLAG_IN_ORDER))))
24022406
return ImmCmdLists[Index];
24032407

24042408
ZeStruct<ze_command_queue_desc_t> ZeCommandQueueDesc;

0 commit comments

Comments
 (0)