Skip to content

Commit

Permalink
Do not permit "custom" or "automatic" in dpctl.SyclPlatform.get_devices
Browse files Browse the repository at this point in the history
These device types act unexpectedly in DPC++ 2025.0.4, returning the same result as `sycl::info::device_type::all`, so use unknown device and return an empty list instead
  • Loading branch information
ndgrigorian committed Feb 18, 2025
1 parent 6a28d07 commit f60d32a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions dpctl/_sycl_platform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,8 @@ 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:
Expand All @@ -428,12 +424,8 @@ cdef class SyclPlatform(_SyclPlatform):
DTy = _device_type._ALL_DEVICES
elif device_type == device_type_t.accelerator:
DTy = _device_type._ACCELERATOR
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

0 comments on commit f60d32a

Please sign in to comment.