dpctl.SyclDevice.filter_string¶
- SyclDevice.filter_string¶
For a root device, returns a fully specified filter selector string
"backend:device_type:relative_id"
selecting the device.- Returns:
A Python string representing a filter selector string.
- Return type:
- Raises:
TypeError – If the device is a sub-device.
- Example:
import dpctl # Create a SyclDevice with an explicit filter string, # in this case the first level_zero gpu device. level_zero_gpu = dpctl.SyclDevice("level_zero:gpu:0") # filter_string property should be "level_zero:gpu:0" dev = dpctl.SyclDevice(level_zero_gpu.filter_string) assert level_zero_gpu == dev