Skip to content

Commit 8954fa2

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

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

libsyclinterface/source/dpctl_sycl_platform_interface.cpp

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

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

0 commit comments

Comments
 (0)