@@ -85,17 +85,18 @@ A possible output for the example :ref:`fig-adv-device-selection` may be:
85
85
A **filter string ** is a three-tuple that may specify the *backend *,
86
86
*device type *, and *device number * as a colon (:) separated string. The
87
87
backend specifies the type of device driver and can have a value such as
88
- *opencl *, *level-zero *, or *cuda *. The device type can be *gpu *, *cpu *,
89
- *accelerator *. And, the device number is a numeric value specifying the
90
- ordinality of the device in the listing of devices as determined by the SYCL
91
- runtime. The filter values are dependent of what the underlying SYCL runtime
92
- supports.
93
-
94
- Each of the backend, device type, and device number value is optional, but
95
- at least one of them should be provided, *i.e. *, ``opencl:gpu:0 ``,
96
- ``gpu:0 ``, ``gpu ``, ``0 ``, and ``opencl:0 `` are all valid filter strings.
97
-
98
- Please refer `oneAPI filter selection extension `_ for more details.
88
+ *host *, *opencl *, *level-zero *, or *cuda *. The device type can be *host *,
89
+ *gpu *, *cpu *, *accelerator *. And, the device number is a numeric value
90
+ specifying the ordinality of the device in the listing of devices as
91
+ determined by the SYCL runtime. Each of the backend, device type, and device
92
+ number value is optional, but at least one of them should be provided,
93
+ *i.e. *, ``opencl:gpu:0 ``, ``gpu:0 ``, ``gpu ``, ``0 ``, and ``opencl:0 `` are
94
+ all valid filter strings.
95
+
96
+ The device listing including the device number value remain stable for
97
+ a given system unless the driver configuration is changed or the SYCL
98
+ runtime setting is changed using the **SYCL_DEVICE_FILTER ** environment
99
+ variable. Please refer `oneAPI filter selection extension `_ for more detail.
99
100
100
101
Advanced Device Selection
101
102
-------------------------
@@ -115,12 +116,19 @@ to accomplish more advanced device selection.
115
116
116
117
The example :ref: `fig-custom-device-selection ` shows a way of selecting a device
117
118
based off a specific hardware property. The :func: `dpctl.get_devices() ` returns
118
- a list of all devices on the system, out of that list the devices that support
119
- half-precision floating-point arithmetic are selected. Finally, a "score"
120
- computed using the SYCL runtime's default device scoring logic that is stored in
121
- :attr: `dpctl.SyclDevice.default_selector_score ` is used to select a single
122
- device. Refer the documentation of :class: `dpctl.SyclDevice ` for a list of
123
- hardware properties that may be used for device selection.
119
+ a list of all *root * devices on the system, out of that list the devices that
120
+ support half-precision floating-point arithmetic are selected. Finally, a
121
+ "score" computed using the SYCL runtime's default device scoring logic that is
122
+ stored in :attr: `dpctl.SyclDevice.default_selector_score ` is used to select a
123
+ single device. Refer the documentation of :class: `dpctl.SyclDevice ` for a list
124
+ of hardware properties that may be used for device selection.
125
+
126
+ .. Note ::
127
+ A **root ** device implies an unpartitioned device. A root device can be
128
+ partitioned into two or more :ref: `sub-devices <sec-devices-sub-devices >`
129
+ based on various criteria. For example, a CPU device with multiple NUMA
130
+ domains may be partitioned into multiple sub-devices, each representing a
131
+ sub-device.
124
132
125
133
A convenience function :func: `dpctl.select_device_with_aspects() ` is available
126
134
that makes it easy to select a device based on a set of specific aspects. The
0 commit comments