dpctl.SyclDevice.device_type

SyclDevice.device_type

Returns the type of the device as a device_type enum.

Example:
>>> import dpctl
>>> dev = dpctl.select_cpu_device()
>>> dev.device_type
<device_type.cpu: 4>
Returns:

The type of device encoded as a device_type enum.

Return type:

device_type

Raises:

ValueError – If the device type is not recognized.