Skip to content

Commit e346c8f

Browse files
committed
task: add more env var documentation
1 parent b4e0dca commit e346c8f

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

docs/doc_sources/user_guides/environment_variables.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,64 @@ The value of the variable is a bit-mask, with the following supported values:
5050
- Enables tracing of PI calls
5151
* - ``-1``
5252
- Enables all levels of tracing
53+
54+
.. _env_var_ze_flat_device_hierarchy:
55+
56+
Variable ``ZE_FLAT_DEVICE_HIERARCHY``
57+
--------------------------
58+
Allows users to define the device hierarchy model exposed by Level Zero driver implementation.
59+
Keep in mind :py:mod:`dpctl.get_composite_devices` will only work while this is set to ``COMBINED``.
60+
61+
.. list-table::
62+
:header-rows: 1
63+
64+
* - Value
65+
- Description
66+
* - ``COMBINED``
67+
- Level Zero devices with multiple tiles will be exposed as a set of root devices, each corresponding to an individual tile. These root devices are component devices, which can be queried for their corresponding composite device, and the composite device can in turn be queried for components. Dedicated composite device APIs will return non-trivial results.
68+
* - ``COMPOSITE``
69+
- Level Zero devices with multiple tiles will be exposed as a singular root device, with tiles accessible as sub-devices.
70+
* - ``FLAT``
71+
- Level Zero devices with multiple tiles will be exposed as a set of root devices, each corresponding to an individual tile. Enabled by default.
72+
73+
Read more `about device hierarchy here <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#device-hierarchy>`_ and `here <https://www.intel.com/content/www/us/en/developer/articles/technical/flattening-gpu-tile-hierarchy.html>`_.
74+
75+
Variable ``ZE_AFFINITY_MASK``
76+
-------------------------------
77+
Allows users to mask specific devices from being used by SYCL applications.
78+
If we have ZE_FLAT_DEVICE_HIERARCHY set to COMPOSITE, we can have an AFFINITY of “1” for our application to only see device #1 - making system devices 0, and 2+, invisible. Etc.
79+
80+
Read more about `affinity masks here <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#affinity-mask>`_.
81+
82+
Variable ``ZE_ENABLE_PCI_ID_DEVICE_ORDER``
83+
-------------------------------
84+
Forces driver to report devices from lowest to highest PCI bus ID.
85+
86+
.. list-table::
87+
:header-rows: 1
88+
89+
* - Value
90+
- Description
91+
* - ``0``
92+
- Disabled. Default value.
93+
* - ``1``
94+
- Enabled.
95+
96+
Variable ``ZE_SHARED_FORCE_DEVICE_ALLOC``
97+
-------------------------------
98+
Forces all shared allocations into device memory
99+
100+
.. list-table::
101+
:header-rows: 1
102+
103+
* - Value
104+
- Description
105+
* - ``0``
106+
- Disabled. Default value.
107+
* - ``1``
108+
- Enabled.
109+
110+
-------------------------------
111+
Other relevant environment variables can be found here:
112+
- `Level Zero <https://intel.github.io/llvm/EnvironmentVariables.html>`
113+
- `OneAPI <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#environment-variables>`

dpctl/_sycl_device_factory.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ cpdef list get_composite_devices():
212212
Only available when `ZE_FLAT_DEVICE_HIERARCHY=COMBINED` is set in
213213
the environment, and only for specific Level Zero devices
214214
(i.e., those which expose multiple tiles as root devices).
215+
To read more about `ZE_FLAT_DEVICE_HIERARCHY=COMBINED`, see :ref:`env_var_ze_flat_device_hierarchy`.
215216
216217
For more information, see:
217218
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_composite_device.asciidoc

0 commit comments

Comments
 (0)