dpctl.SyclPlatform.get_devices

SyclPlatform.get_devices(device_type=device_type.all)

Returns the list of dpctl.SyclDevice objects associated with dpctl.SyclPlatform instance selected based on the given dpctl.device_type.

Parameters:

device_type (str, dpctl.device_type, optional) – A dpctl.device_type enum value or a string that specifies a SYCL device type. Currently, accepted values are: “gpu”, “cpu”, “accelerator”, or “all”, and their equivalent dpctl.device_type enumerators. Default: dpctl.device_type.all.

Returns:

A list of dpctl.SyclDevice objects that belong to this platform.

Return type:

list

Raises:
  • TypeError – If device_type is not a string or dpctl.device_type enum.

  • ValueError – If the DPCTLPlatform_GetDevices call returned NULL instead of a DPCTLDeviceVectorRef object.