Skip to content

Commit

Permalink
[L0][L0 v2] add command list creation logs
Browse files Browse the repository at this point in the history
To support both legacy and v2 adapter in SYCL tests
  • Loading branch information
igchor committed Dec 31, 2024
1 parent f4bdf5b commit d9cb413
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/adapters/level_zero/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,10 @@ ur_result_t ur_queue_handle_t_::createCommandList(
IsInOrderList = true;
}

logger::debug(
"create command list ordinal: {}, type: regular, device: {}, inOrder: {}",
QueueGroupOrdinal, Device->ZeDevice, IsInOrderList);

ZE2UR_CALL(zeCommandListCreate, (Context->ZeContext, Device->ZeDevice,
&ZeCommandListDesc, &ZeCommandList));

Expand Down Expand Up @@ -2454,6 +2458,10 @@ ur_command_list_ptr_t &ur_queue_handle_t_::ur_queue_group_t::getImmCmdList() {
"(round robin in [{}, {}]) priority = {}",
ZeCommandQueueDesc.ordinal, ZeCommandQueueDesc.index,
LowerIndex, UpperIndex, Priority);
logger::debug("create command list ordinal: {}, type: immediate, device: "
"{}, inOrder: {}",
ZeCommandQueueDesc.ordinal, Queue->Device->ZeDevice,
isInOrderList);

ZE_CALL_NOCHECK(zeCommandListCreateImmediate,
(Queue->Context->ZeContext, Queue->Device->ZeDevice,
Expand Down
11 changes: 11 additions & 0 deletions source/adapters/level_zero/v2/command_list_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ command_list_cache_t::createCommandList(const command_list_descriptor_t &desc) {
QueueDesc.index = ImmCmdDesc->Index.value();
}
QueueDesc.pNext = &offloadDesc;

logger::debug("create command list ordinal: {}, type: immediate, device: "
"{}, inOrder: {}",
ImmCmdDesc->Ordinal, ImmCmdDesc->ZeDevice,
ImmCmdDesc->IsInOrder);

ZE2UR_CALL_THROWS(
zeCommandListCreateImmediate,
(ZeContext, ImmCmdDesc->ZeDevice, &QueueDesc, &ZeCommandList));
Expand All @@ -81,6 +87,11 @@ command_list_cache_t::createCommandList(const command_list_descriptor_t &desc) {
CmdListDesc.commandQueueGroupOrdinal = RegCmdDesc.Ordinal;
CmdListDesc.pNext = &offloadDesc;

logger::debug("create command list ordinal: {}, type: immediate, device: "
"{}, inOrder: {}",
RegCmdDesc.Ordinal, RegCmdDesc.ZeDevice,
RegCmdDesc.IsInOrder);

ze_command_list_handle_t ZeCommandList;
ZE2UR_CALL_THROWS(zeCommandListCreate, (ZeContext, RegCmdDesc.ZeDevice,
&CmdListDesc, &ZeCommandList));
Expand Down

0 comments on commit d9cb413

Please sign in to comment.