Filter Selector String¶
Filter selector string is a way to refer to unpartitioned SYCL devices proposed in sycl_ext_oneapi_filter_selector extension to SYCL standard.
This document captures aspects of the referenced document relevant
to dpctl
.
A filter selector string defines one or more filters, which must be
separated using ","
character. A filter is specified as a
triple of the form:
Backend:DeviceType:RelativeDeviceNumber
Every element of the triple is optional, but a filter must contain at least one component.
Backend
specifies the desired backend of targeted devices, while
DeviceType
specifies the type of targeted devices.
RelativeDeviceNumber
refers to the number of the device that matches
any other given requirements, starting from 0 to marking the
“first device that matches the requirements”.
Attempting to use a non-conforming string in places where filter selector string is expected will raise an exception.
Supported values for Backend
are:
cuda |
opencl |
level_zero |
hip |
Supported values for DeviceType
are:
accelerator |
cpu |
gpu |
Filter selector strings can be used as arguments to constructors of
dpctl.SyclDevice
, dpctl.SyclContext
,
dpctl.SyclPlatform
, dpctl.SyclQueue
,
or dpctl.tensor.Device
classes, as well as values of
device
keyword in array creation functions.