Skip to content

Commit 6d768a1

Browse files
committed
print queue priority under ZE_DEBUG
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent e2eef6e commit 6d768a1

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,10 +1837,13 @@ _pi_queue::pi_queue_group_t::getZeQueue(uint32_t *QueueGroupOrdinal) {
18371837
ZeCommandQueueDesc.ordinal = *QueueGroupOrdinal;
18381838
ZeCommandQueueDesc.index = QueueIndex;
18391839
ZeCommandQueueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
1840+
const char *Priority = "Normal";
18401841
if (Queue->isPriorityLow()) {
18411842
ZeCommandQueueDesc.priority = ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW;
1843+
Priority = "Low";
18421844
} else if (Queue->isPriorityHigh()) {
18431845
ZeCommandQueueDesc.priority = ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH;
1846+
Priority = "High";
18441847
}
18451848

18461849
// Evaluate performance of explicit usage for "0" index.
@@ -1849,9 +1852,9 @@ _pi_queue::pi_queue_group_t::getZeQueue(uint32_t *QueueGroupOrdinal) {
18491852
}
18501853

18511854
zePrint("[getZeQueue]: create queue ordinal = %d, index = %d "
1852-
"(round robin in [%d, %d])\n",
1855+
"(round robin in [%d, %d]) priority = %s\n",
18531856
ZeCommandQueueDesc.ordinal, ZeCommandQueueDesc.index, LowerIndex,
1854-
UpperIndex);
1857+
UpperIndex, Priority);
18551858

18561859
auto ZeResult = ZE_CALL_NOCHECK(
18571860
zeCommandQueueCreate, (Queue->Context->ZeContext, Queue->Device->ZeDevice,
@@ -1877,16 +1880,24 @@ pi_command_list_ptr_t &_pi_queue::pi_queue_group_t::getImmCmdList() {
18771880
ZeCommandQueueDesc.ordinal = QueueOrdinal;
18781881
ZeCommandQueueDesc.index = QueueIndex;
18791882
ZeCommandQueueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
1883+
const char *Priority = "Normal";
1884+
if (Queue->isPriorityLow()) {
1885+
ZeCommandQueueDesc.priority = ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW;
1886+
Priority = "Low";
1887+
} else if (Queue->isPriorityHigh()) {
1888+
ZeCommandQueueDesc.priority = ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH;
1889+
Priority = "High";
1890+
}
18801891

18811892
// Evaluate performance of explicit usage for "0" index.
18821893
if (QueueIndex != 0) {
18831894
ZeCommandQueueDesc.flags = ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY;
18841895
}
18851896

18861897
zePrint("[getZeQueue]: create queue ordinal = %d, index = %d "
1887-
"(round robin in [%d, %d])\n",
1898+
"(round robin in [%d, %d]) priority = %s\n",
18881899
ZeCommandQueueDesc.ordinal, ZeCommandQueueDesc.index, LowerIndex,
1889-
UpperIndex);
1900+
UpperIndex, Priority);
18901901

18911902
ze_command_list_handle_t ZeCommandList;
18921903
ZE_CALL_NOCHECK(zeCommandListCreateImmediate,

0 commit comments

Comments
 (0)