@@ -449,7 +449,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueRelease(
449449 ->ZeCopyCommandListCache [Queue->Device ->ZeDevice ]
450450 : Queue->Context
451451 ->ZeComputeCommandListCache [Queue->Device ->ZeDevice ];
452- ZeCommandListCache.push_back ({it->first , it->second .ZeQueueDesc });
452+ struct l0_command_list_cache_info ListInfo;
453+ ListInfo.ZeQueueDesc = it->second .ZeQueueDesc ;
454+ ListInfo.InOrderList = it->second .IsInOrderList ;
455+ ZeCommandListCache.push_back ({it->first , ListInfo});
453456 } else {
454457 // A non-reusable comamnd list that came from a make_queue call is
455458 // destroyed since it cannot be recycled.
@@ -1708,8 +1711,10 @@ ur_result_t ur_queue_handle_t_::resetCommandList(
17081711 UseCopyEngine
17091712 ? this ->Context ->ZeCopyCommandListCache [this ->Device ->ZeDevice ]
17101713 : this ->Context ->ZeComputeCommandListCache [this ->Device ->ZeDevice ];
1711- ZeCommandListCache.push_back (
1712- {CommandList->first , CommandList->second .ZeQueueDesc });
1714+ struct l0_command_list_cache_info ListInfo;
1715+ ListInfo.ZeQueueDesc = CommandList->second .ZeQueueDesc ;
1716+ ListInfo.InOrderList = CommandList->second .IsInOrderList ;
1717+ ZeCommandListCache.push_back ({CommandList->first , ListInfo});
17131718 }
17141719
17151720 return UR_RESULT_SUCCESS;
@@ -1870,8 +1875,10 @@ ur_result_t ur_queue_handle_t_::createCommandList(
18701875 ZeStruct<ze_command_list_desc_t > ZeCommandListDesc;
18711876 ZeCommandListDesc.commandQueueGroupOrdinal = QueueGroupOrdinal;
18721877
1878+ bool IsInOrderList = false ;
18731879 if (Device->useDriverInOrderLists () && isInOrderQueue ()) {
18741880 ZeCommandListDesc.flags = ZE_COMMAND_LIST_FLAG_IN_ORDER;
1881+ IsInOrderList = true ;
18751882 }
18761883
18771884 ZE2UR_CALL (zeCommandListCreate, (Context->ZeContext , Device->ZeDevice ,
@@ -1882,7 +1889,8 @@ ur_result_t ur_queue_handle_t_::createCommandList(
18821889 ZeQueueDesc.ordinal = QueueGroupOrdinal;
18831890 std::tie (CommandList, std::ignore) = CommandListMap.insert (
18841891 std::pair<ze_command_list_handle_t , ur_command_list_info_t >(
1885- ZeCommandList, {ZeFence, false , false , ZeCommandQueue, ZeQueueDesc}));
1892+ ZeCommandList,
1893+ {ZeFence, false , false , ZeCommandQueue, ZeQueueDesc, IsInOrderList}));
18861894
18871895 UR_CALL (insertStartBarrierIfDiscardEventsMode (CommandList));
18881896 UR_CALL (insertActiveBarriers (CommandList, UseCopyEngine));
@@ -2011,7 +2019,7 @@ ur_command_list_ptr_t &ur_queue_handle_t_::ur_queue_group_t::getImmCmdList() {
20112019 ->ZeComputeCommandListCache [Queue->Device ->ZeDevice ];
20122020 for (auto ZeCommandListIt = ZeCommandListCache.begin ();
20132021 ZeCommandListIt != ZeCommandListCache.end (); ++ZeCommandListIt) {
2014- const auto &Desc = (*ZeCommandListIt).second ;
2022+ const auto &Desc = (*ZeCommandListIt).second . ZeQueueDesc ;
20152023 if (Desc.index == ZeCommandQueueDesc.index &&
20162024 Desc.flags == ZeCommandQueueDesc.flags &&
20172025 Desc.mode == ZeCommandQueueDesc.mode &&
0 commit comments