Skip to content

Commit 3892501

Browse files
committed
work around UR warnings from SyclPlatform.get_devices
1 parent 86d7384 commit 3892501

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

libsyclinterface/source/dpctl_sycl_platform_interface.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@ DPCTLPlatform_GetDevices(__dpctl_keep const DPCTLSyclPlatformRef PRef,
304304
return wrap<vecTy>(DevicesVectorPtr);
305305
}
306306

307+
BTy = DPCTL_SyclBackendToDPCTLBackendType(P->get_backend());
308+
if (DTy == DPCTLSyclDeviceType::DPCTL_CUSTOM_DEVICE &&
309+
BTy == DPCTLSyclBackendType::DPCTL_LEVEL_ZERO)
310+
{
311+
// avoid ugly warnings from unified runtime
312+
return wrap<vecTy>(DevicesVectorPtr);
313+
}
314+
307315
try {
308316
auto SyclDTy = DPCTL_DPCTLDeviceTypeToSyclDeviceType(DTy);
309317
auto Devices = P->get_devices(SyclDTy);

0 commit comments

Comments
 (0)