Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions dpctl/_sycl_platform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -415,19 +415,27 @@ cdef class SyclPlatform(_SyclPlatform):
DTy = _device_type._ACCELERATOR
elif dty_str == "all":
DTy = _device_type._ALL_DEVICES
elif dty_str == "automatic":
DTy = _device_type._AUTOMATIC
elif dty_str == "cpu":
DTy = _device_type._CPU
elif dty_str == "custom":
DTy = _device_type._CUSTOM
elif dty_str == "gpu":
DTy = _device_type._GPU
else:
DTy = _device_type._UNKNOWN_DEVICE
elif isinstance(device_type, device_type_t):
if device_type == device_type_t.all:
DTy = _device_type._ALL_DEVICES
elif device_type == device_type_t.accelerator:
if device_type == device_type_t.accelerator:
DTy = _device_type._ACCELERATOR
elif device_type == device_type_t.all:
DTy = _device_type._ALL_DEVICES
elif device_type == device_type_t.automatic:
DTy = _device_type._AUTOMATIC
elif device_type == device_type_t.cpu:
DTy = _device_type._CPU
elif device_type == device_type_t.custom:
DTy = _device_type._CUSTOM
elif device_type == device_type_t.gpu:
DTy = _device_type._GPU
else:
Expand Down
4 changes: 0 additions & 4 deletions libsyclinterface/source/dpctl_sycl_platform_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ DPCTLPlatform_GetDevices(__dpctl_keep const DPCTLSyclPlatformRef PRef,
return nullptr;
}

// handle unknown device
// custom and automatic are also treated as unknown
// as DPC++ would normally treat as `all`
// see CMPLRLLVM-65826
if (DTy == DPCTLSyclDeviceType::DPCTL_UNKNOWN_DEVICE) {
return wrap<vecTy>(DevicesVectorPtr);
}
Expand Down
Loading