@@ -449,7 +449,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueRelease(
449
449
->ZeCopyCommandListCache [Queue->Device ->ZeDevice ]
450
450
: Queue->Context
451
451
->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});
453
456
} else {
454
457
// A non-reusable comamnd list that came from a make_queue call is
455
458
// destroyed since it cannot be recycled.
@@ -1708,8 +1711,10 @@ ur_result_t ur_queue_handle_t_::resetCommandList(
1708
1711
UseCopyEngine
1709
1712
? this ->Context ->ZeCopyCommandListCache [this ->Device ->ZeDevice ]
1710
1713
: 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});
1713
1718
}
1714
1719
1715
1720
return UR_RESULT_SUCCESS;
@@ -1870,8 +1875,10 @@ ur_result_t ur_queue_handle_t_::createCommandList(
1870
1875
ZeStruct<ze_command_list_desc_t > ZeCommandListDesc;
1871
1876
ZeCommandListDesc.commandQueueGroupOrdinal = QueueGroupOrdinal;
1872
1877
1878
+ bool IsInOrderList = false ;
1873
1879
if (Device->useDriverInOrderLists () && isInOrderQueue ()) {
1874
1880
ZeCommandListDesc.flags = ZE_COMMAND_LIST_FLAG_IN_ORDER;
1881
+ IsInOrderList = true ;
1875
1882
}
1876
1883
1877
1884
ZE2UR_CALL (zeCommandListCreate, (Context->ZeContext , Device->ZeDevice ,
@@ -1882,7 +1889,8 @@ ur_result_t ur_queue_handle_t_::createCommandList(
1882
1889
ZeQueueDesc.ordinal = QueueGroupOrdinal;
1883
1890
std::tie (CommandList, std::ignore) = CommandListMap.insert (
1884
1891
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}));
1886
1894
1887
1895
UR_CALL (insertStartBarrierIfDiscardEventsMode (CommandList));
1888
1896
UR_CALL (insertActiveBarriers (CommandList, UseCopyEngine));
@@ -2011,7 +2019,7 @@ ur_command_list_ptr_t &ur_queue_handle_t_::ur_queue_group_t::getImmCmdList() {
2011
2019
->ZeComputeCommandListCache [Queue->Device ->ZeDevice ];
2012
2020
for (auto ZeCommandListIt = ZeCommandListCache.begin ();
2013
2021
ZeCommandListIt != ZeCommandListCache.end (); ++ZeCommandListIt) {
2014
- const auto &Desc = (*ZeCommandListIt).second ;
2022
+ const auto &Desc = (*ZeCommandListIt).second . ZeQueueDesc ;
2015
2023
if (Desc.index == ZeCommandQueueDesc.index &&
2016
2024
Desc.flags == ZeCommandQueueDesc.flags &&
2017
2025
Desc.mode == ZeCommandQueueDesc.mode &&
0 commit comments