Skip to content

Commit 2665320

Browse files
author
Diptorup Deb
committed
Incorporate review comments.
1 parent 947e67a commit 2665320

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

docs/docfiles/user_guides/manual/dpctl/device_selection.rst

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,18 @@ A possible output for the example :ref:`fig-adv-device-selection` may be:
8585
A **filter string** is a three-tuple that may specify the *backend*,
8686
*device type*, and *device number* as a colon (:) separated string. The
8787
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.
99100

100101
Advanced Device Selection
101102
-------------------------
@@ -115,12 +116,19 @@ to accomplish more advanced device selection.
115116

116117
The example :ref:`fig-custom-device-selection` shows a way of selecting a device
117118
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.
124132

125133
A convenience function :func:`dpctl.select_device_with_aspects()` is available
126134
that makes it easy to select a device based on a set of specific aspects. The

docs/docfiles/user_guides/manual/dpctl/devices.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,16 @@ Listing devices
2020

2121
Get a list of devices
2222

23-
Selecting a device
24-
------------------
25-
26-
.. todo::
27-
28-
Demonstrate all the ways we can select devices.
29-
30-
Query device properties
31-
-----------------------
23+
Device Aspects and Properties
24+
-----------------------------
3225

3326
.. todo::
3427

3528
Demonstrate how to query a device's various aspects and properties.
3629

3730

31+
.. _sec-devices-sub-devices:
32+
3833
Sub-devices
3934
-----------
4035

0 commit comments

Comments
 (0)