From 5d0d4ef9eede55e675b8ac855d99c8bc4dcefa06 Mon Sep 17 00:00:00 2001 From: smaslov-intel Date: Wed, 2 Nov 2022 10:49:38 -0700 Subject: [PATCH] [SYCL][L0] In piextQueueGetNativeHandle create a L0 queue if it was not yet created (#7253) Signed-off-by: Sergey V Maslov --- sycl/plugins/level_zero/pi_level_zero.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index aa559122f0956..9a2997427890d 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -3794,8 +3794,10 @@ pi_result piextQueueGetNativeHandle(pi_queue Queue, std::shared_lock lock(Queue->Mutex); auto ZeQueue = pi_cast(NativeHandle); - // Extract the Level Zero compute queue handle from the given PI queue - *ZeQueue = Queue->ComputeQueueGroup.ZeQueues[0]; + + // Extract a Level Zero compute queue handle from the given PI queue + uint32_t QueueGroupOrdinalUnused; + *ZeQueue = Queue->ComputeQueueGroup.getZeQueue(&QueueGroupOrdinalUnused); return PI_SUCCESS; }