dpctl.SyclPlatform.get_devices¶
- SyclPlatform.get_devices(device_type=device_type.all)¶
Returns the list of
dpctl.SyclDevice
objects associated withdpctl.SyclPlatform
instance selected based on the givendpctl.device_type
.- Parameters:
device_type (str,
dpctl.device_type
, optional) – Adpctl.device_type
enum value or a string that specifies a SYCL device type. Currently, accepted values are: “gpu”, “cpu”, “accelerator”, or “all”, and their equivalentdpctl.device_type
enumerators. Default:dpctl.device_type.all
.- Returns:
A
list
ofdpctl.SyclDevice
objects that belong to this platform.- Return type:
- Raises:
TypeError – If device_type is not a string or
dpctl.device_type
enum.ValueError – If the
DPCTLPlatform_GetDevices
call returnedNULL
instead of aDPCTLDeviceVectorRef
object.