dpctl.SyclPlatform.get_devices¶
- SyclPlatform.get_devices(device_type=device_type.all)¶
Returns the list of
dpctl.SyclDeviceobjects associated withdpctl.SyclPlatforminstance selected based on the givendpctl.device_type.- Parameters:
device_type (str,
dpctl.device_type, optional) – Adpctl.device_typeenum value or a string that specifies a SYCL device type. Currently, accepted values are: “gpu”, “cpu”, “accelerator”, or “all”, and their equivalentdpctl.device_typeenumerators. Default:dpctl.device_type.all.- Returns:
A
listofdpctl.SyclDeviceobjects that belong to this platform.- Return type:
- Raises:
TypeError – If device_type is not a string or
dpctl.device_typeenum.ValueError – If the
DPCTLPlatform_GetDevicescall returnedNULLinstead of aDPCTLDeviceVectorRefobject.