Skip to content

Commit 8ac51b4

Browse files
DPCTLDeviceMgr_GetNumDevices should not operate on rejected devices
1 parent b4b9722 commit 8ac51b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libsyclinterface/source/dpctl_sycl_device_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ size_t DPCTLDeviceMgr_GetNumDevices(int device_identifier)
287287
return 0;
288288

289289
for (const auto &entry : cache) {
290+
if (mRanker(entry.first) < 0)
291+
continue;
290292
auto Bty(DPCTL_SyclBackendToDPCTLBackendType(
291293
entry.first.get_platform().get_backend()));
292294
auto Dty(DPCTL_SyclDeviceTypeToDPCTLDeviceType(

0 commit comments

Comments
 (0)