Skip to content

Commit ed3d35c

Browse files
[SYCL][Level Zero] Fix sub-sub-device in immediate cmdlists mode (#7712)
We still need to initialize the command lists similarly to the regular case. Sub-sub-device properties are handler by indexing into those vectors.
1 parent 18718fd commit ed3d35c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,12 @@ _pi_queue::_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
12011201
// fixed to one particular compute CCS (it is so for sub-sub-devices).
12021202
auto &ComputeQueueGroupInfo = Device->QueueGroup[queue_type::Compute];
12031203
ComputeQueueGroup.ZeQueues = ComputeQueues;
1204+
// Create space to hold immediate commandlists corresponding to the
1205+
// ZeQueues
1206+
if (Device->useImmediateCommandLists()) {
1207+
ComputeQueueGroup.ImmCmdLists = std::vector<pi_command_list_ptr_t>(
1208+
ComputeQueueGroup.ZeQueues.size(), CommandListMap.end());
1209+
}
12041210
if (ComputeQueueGroupInfo.ZeIndex >= 0) {
12051211
ComputeQueueGroup.LowerIndex = ComputeQueueGroupInfo.ZeIndex;
12061212
ComputeQueueGroup.UpperIndex = ComputeQueueGroupInfo.ZeIndex;
@@ -1215,12 +1221,6 @@ _pi_queue::_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
12151221
ComputeQueueGroup.LowerIndex = FilterLowerIndex;
12161222
ComputeQueueGroup.UpperIndex = FilterUpperIndex;
12171223
ComputeQueueGroup.NextIndex = ComputeQueueGroup.LowerIndex;
1218-
// Create space to hold immediate commandlists corresponding to the
1219-
// ZeQueues
1220-
if (Device->useImmediateCommandLists()) {
1221-
ComputeQueueGroup.ImmCmdLists = std::vector<pi_command_list_ptr_t>(
1222-
ComputeQueueGroup.ZeQueues.size(), CommandListMap.end());
1223-
}
12241224
} else {
12251225
die("No compute queue available/allowed.");
12261226
}

0 commit comments

Comments
 (0)