From 8954fa24d4fdef27574de8580dd62ddaf0dbba7c Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 29 Apr 2026 15:42:53 -0700 Subject: [PATCH] work around UR warnings from SyclPlatform.get_devices --- .../source/dpctl_sycl_platform_interface.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libsyclinterface/source/dpctl_sycl_platform_interface.cpp b/libsyclinterface/source/dpctl_sycl_platform_interface.cpp index 73bef73266..aa450382e9 100644 --- a/libsyclinterface/source/dpctl_sycl_platform_interface.cpp +++ b/libsyclinterface/source/dpctl_sycl_platform_interface.cpp @@ -304,6 +304,15 @@ DPCTLPlatform_GetDevices(__dpctl_keep const DPCTLSyclPlatformRef PRef, return wrap(DevicesVectorPtr); } + DPCTLSyclBackendType BTy = + DPCTL_SyclBackendToDPCTLBackendType(P->get_backend()); + if (DTy == DPCTLSyclDeviceType::DPCTL_CUSTOM && + BTy == DPCTLSyclBackendType::DPCTL_LEVEL_ZERO) + { + // avoid ugly warnings from unified runtime + return wrap(DevicesVectorPtr); + } + try { auto SyclDTy = DPCTL_DPCTLDeviceTypeToSyclDeviceType(DTy); auto Devices = P->get_devices(SyclDTy);