Skip to content

Commit 9de8bc5

Browse files
author
github-actions[doc-deploy-bot]
committed
Latest docs.
1 parent 0df5286 commit 9de8bc5

File tree

6 files changed

+174
-4
lines changed

6 files changed

+174
-4
lines changed

master/_sources/user_guides/environment_variables.rst.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Environment variables
66

77
Behavior of :py:mod:`dpctl` is affected by :dpcpp_envar:`environment variables <>` that
88
affect DPC++ compiler runtime.
9+
Other relevant environment variables that may not be documented here can be found in:
10+
11+
- `Level Zero <https://intel.github.io/llvm/EnvironmentVariables.html>`_
12+
13+
- `OneAPI <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#environment-variables>`_
14+
915

1016
Variable ``ONEAPI_DEVICE_SELECTOR``
1117
-----------------------------------
@@ -50,3 +56,70 @@ The value of the variable is a bit-mask, with the following supported values:
5056
- Enables tracing of PI calls
5157
* - ``-1``
5258
- Enables all levels of tracing
59+
60+
.. _env_var_ze_flat_device_hierarchy:
61+
62+
Variable ``ZE_FLAT_DEVICE_HIERARCHY``
63+
--------------------------
64+
Allows users to define the device hierarchy model exposed by Level Zero driver implementation.
65+
Keep in mind :py:mod:`dpctl.get_composite_devices` will only work while this is set to ``COMBINED``.
66+
67+
.. list-table::
68+
:header-rows: 1
69+
70+
* - Value
71+
- Description
72+
* - ``COMBINED``
73+
- 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.
74+
* - ``COMPOSITE``
75+
- Level Zero devices with multiple tiles will be exposed as a singular root device, with tiles accessible as sub-devices.
76+
* - ``FLAT``
77+
- Level Zero devices with multiple tiles will be exposed as a set of root devices, each corresponding to an individual tile. Enabled by default.
78+
79+
Read more about device hierarchy in `Level Zero Specification <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#device-hierarchy>`_ and `Intel GPU article <https://www.intel.com/content/www/us/en/developer/articles/technical/flattening-gpu-tile-hierarchy.html>`_.
80+
81+
Variable ``ZE_AFFINITY_MASK``
82+
-------------------------------
83+
Allows users to mask specific devices from being used by SYCL applications.
84+
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.
85+
86+
If we have ``ZE_FLAT_DEVICE_HIERARCHY`` set to ``FLAT``, we can have a ``ZE_AFFINITY_MASK`` of “1” for our application to only see the second tile in the system as logical device #0.
87+
If the system has four dual-tile GPUs installed, this would be the second tile in the first GPU. In ``FLAT`` mode, the numbers use a system-wide-sub-device-number from a flat numbering perspective.
88+
Therefore, we could use the second tile in each of four dual-tile GPUs with ``ZE_AFFINITY_MASK=1,3,5,7``.
89+
90+
| If we have ``ZE_FLAT_DEVICE_HIERARCHY`` set to ``COMBINED``, the way tiles and composite devices are exposed depends on the physical devices present and the value of ``ZE_AFFINITY_MASK``:
91+
| **If all exposed tiles (as determined by ``ZE_AFFINITY_MASK``) belong to the same physical device:**
92+
| - That composite device is available to the application, and each tile is accessible as a component device of that composite device.
93+
94+
| **If the exposed tiles belong to different physical devices:**
95+
| - A composite device is available for each physical device, and the tiles are accessible as component devices of their respective composite device.
96+
97+
Additional examples to illustrate this are in the detailed documentation for ``ZE_AFFINITY_MASK``, read more about it in `Level Zero Specification <https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#affinity-mask>`_.
98+
99+
Variable ``ZE_ENABLE_PCI_ID_DEVICE_ORDER``
100+
-------------------------------
101+
Forces driver to report devices from lowest to highest PCI bus ID.
102+
103+
.. list-table::
104+
:header-rows: 1
105+
106+
* - Value
107+
- Description
108+
* - ``0``
109+
- Disabled. Default value.
110+
* - ``1``
111+
- Enabled.
112+
113+
Variable ``ZE_SHARED_FORCE_DEVICE_ALLOC``
114+
-------------------------------
115+
Forces all shared allocations into device memory
116+
117+
.. list-table::
118+
:header-rows: 1
119+
120+
* - Value
121+
- Description
122+
* - ``0``
123+
- Disabled. Default value.
124+
* - ``1``
125+
- Enabled.

master/api_reference/dpctl/generated/dpctl.get_composite_devices.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ <h1>dpctl.get_composite_devices<a class="headerlink" href="#dpctl-get-composite-
806806
instances.</p>
807807
<p>Only available when <cite>ZE_FLAT_DEVICE_HIERARCHY=COMBINED</cite> is set in
808808
the environment, and only for specific Level Zero devices
809-
(i.e., those which expose multiple tiles as root devices).</p>
809+
(i.e., those which expose multiple tiles as root devices).
810+
To read more about <cite>ZE_FLAT_DEVICE_HIERARCHY=COMBINED</cite>,
811+
see <a class="reference internal" href="../../../user_guides/environment_variables.html#env-var-ze-flat-device-hierarchy"><span class="std std-ref">Variable ZE_FLAT_DEVICE_HIERARCHY</span></a>.</p>
810812
<p>For more information, see:
811813
<a class="reference external" href="https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_composite_device.asciidoc">https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_composite_device.asciidoc</a></p>
812814
<dl class="field-list simple">

master/beginners_guides/installation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ <h2>Installation using pip<a class="headerlink" href="#installation-using-pip" t
867867
<section id="installation-via-intel-r-distribution-for-python">
868868
<h2>Installation via Intel(R) Distribution for Python<a class="headerlink" href="#installation-via-intel-r-distribution-for-python" title="Permalink to this heading"></a></h2>
869869
<p><a class="reference external" href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html">Intel(R) Distribution for Python*</a> is distributed as a conda-based installer
870-
and includes <a class="reference internal" href="../api_reference/dpctl/index.html#module-dpctl" title="dpctl"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl</span></code></a> along with its dependencies and sister projects <a class="reference external" href="https://intelpython.github.io/dpnp/overview.html#module-dpnp" title="(in Data Parallel Extension for NumPy v0.19.0dev3+12.gd975818161f)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpnp</span></code></a>
870+
and includes <a class="reference internal" href="../api_reference/dpctl/index.html#module-dpctl" title="dpctl"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl</span></code></a> along with its dependencies and sister projects <a class="reference external" href="https://intelpython.github.io/dpnp/overview.html#module-dpnp" title="(in Data Parallel Extension for NumPy v0.19.0dev3+14.g5584348f2da)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpnp</span></code></a>
871871
and <a class="reference external" href="https://intelpython.github.io/numba-dpex/latest/index.html#module-numba_dpex" title="(in numba-dpex)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numba_dpex</span></code></a>.</p>
872872
<p>Once the installed environment is activated, <code class="docutils literal notranslate"><span class="pre">dpctl</span></code> should be ready to use.</p>
873873
</section>

master/objects.inv

75 Bytes
Binary file not shown.

master/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

master/user_guides/environment_variables.html

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,12 @@
800800
<section id="environment-variables">
801801
<span id="user-guides-env-variables"></span><h1>Environment variables<a class="headerlink" href="#environment-variables" title="Permalink to this heading"></a></h1>
802802
<p>Behavior of <a class="reference internal" href="../api_reference/dpctl/index.html#module-dpctl" title="dpctl"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl</span></code></a> is affected by <a class="reference external" href="https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md">environment variables</a> that
803-
affect DPC++ compiler runtime.</p>
803+
affect DPC++ compiler runtime.
804+
Other relevant environment variables that may not be documented here can be found in:</p>
805+
<ul class="simple">
806+
<li><p><a class="reference external" href="https://intel.github.io/llvm/EnvironmentVariables.html">Level Zero</a></p></li>
807+
<li><p><a class="reference external" href="https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#environment-variables">OneAPI</a></p></li>
808+
</ul>
804809
<section id="variable-oneapi-device-selector">
805810
<h2>Variable <code class="docutils literal notranslate"><span class="pre">ONEAPI_DEVICE_SELECTOR</span></code><a class="headerlink" href="#variable-oneapi-device-selector" title="Permalink to this heading"></a></h2>
806811
<p>The variable <code class="docutils literal notranslate"><span class="pre">ONEAPI_DEVICE_SELECTOR</span></code> can be used to limit the choice of devices
@@ -848,6 +853,92 @@ <h2>Variable <code class="docutils literal notranslate"><span class="pre">SYCL_P
848853
</table>
849854
</div>
850855
</section>
856+
<section id="variable-ze-flat-device-hierarchy">
857+
<span id="env-var-ze-flat-device-hierarchy"></span><h2>Variable <code class="docutils literal notranslate"><span class="pre">ZE_FLAT_DEVICE_HIERARCHY</span></code><a class="headerlink" href="#variable-ze-flat-device-hierarchy" title="Permalink to this heading"></a></h2>
858+
<p>Allows users to define the device hierarchy model exposed by Level Zero driver implementation.
859+
Keep in mind <a class="reference internal" href="../api_reference/dpctl/generated/dpctl.get_composite_devices.html#dpctl.get_composite_devices" title="dpctl.get_composite_devices"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.get_composite_devices</span></code></a> will only work while this is set to <code class="docutils literal notranslate"><span class="pre">COMBINED</span></code>.</p>
860+
<div class="table-wrapper docutils container">
861+
<table class="docutils align-default">
862+
<thead>
863+
<tr class="row-odd"><th class="head"><p>Value</p></th>
864+
<th class="head"><p>Description</p></th>
865+
</tr>
866+
</thead>
867+
<tbody>
868+
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">COMBINED</span></code></p></td>
869+
<td><p>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.</p></td>
870+
</tr>
871+
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">COMPOSITE</span></code></p></td>
872+
<td><p>Level Zero devices with multiple tiles will be exposed as a singular root device, with tiles accessible as sub-devices.</p></td>
873+
</tr>
874+
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">FLAT</span></code></p></td>
875+
<td><p>Level Zero devices with multiple tiles will be exposed as a set of root devices, each corresponding to an individual tile. Enabled by default.</p></td>
876+
</tr>
877+
</tbody>
878+
</table>
879+
</div>
880+
<p>Read more about device hierarchy in <a class="reference external" href="https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#device-hierarchy">Level Zero Specification</a> and <a class="reference external" href="https://www.intel.com/content/www/us/en/developer/articles/technical/flattening-gpu-tile-hierarchy.html">Intel GPU article</a>.</p>
881+
</section>
882+
<section id="variable-ze-affinity-mask">
883+
<h2>Variable <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK</span></code><a class="headerlink" href="#variable-ze-affinity-mask" title="Permalink to this heading"></a></h2>
884+
<p>Allows users to mask specific devices from being used by SYCL applications.
885+
If we have <code class="docutils literal notranslate"><span class="pre">ZE_FLAT_DEVICE_HIERARCHY</span></code> set to <code class="docutils literal notranslate"><span class="pre">COMPOSITE</span></code>, we can have an AFFINITY of “1” for our application to only see device #1 - making system devices 0, and 2+, invisible.</p>
886+
<p>If we have <code class="docutils literal notranslate"><span class="pre">ZE_FLAT_DEVICE_HIERARCHY</span></code> set to <code class="docutils literal notranslate"><span class="pre">FLAT</span></code>, we can have a <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK</span></code> of “1” for our application to only see the second tile in the system as logical device #0.
887+
If the system has four dual-tile GPUs installed, this would be the second tile in the first GPU. In <code class="docutils literal notranslate"><span class="pre">FLAT</span></code> mode, the numbers use a system-wide-sub-device-number from a flat numbering perspective.
888+
Therefore, we could use the second tile in each of four dual-tile GPUs with <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK=1,3,5,7</span></code>.</p>
889+
<div class="line-block">
890+
<div class="line">If we have <code class="docutils literal notranslate"><span class="pre">ZE_FLAT_DEVICE_HIERARCHY</span></code> set to <code class="docutils literal notranslate"><span class="pre">COMBINED</span></code>, the way tiles and composite devices are exposed depends on the physical devices present and the value of <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK</span></code>:</div>
891+
<div class="line"><strong>If all exposed tiles (as determined by ``ZE_AFFINITY_MASK``) belong to the same physical device:</strong></div>
892+
<div class="line">- That composite device is available to the application, and each tile is accessible as a component device of that composite device.</div>
893+
</div>
894+
<div class="line-block">
895+
<div class="line"><strong>If the exposed tiles belong to different physical devices:</strong></div>
896+
<div class="line">- A composite device is available for each physical device, and the tiles are accessible as component devices of their respective composite device.</div>
897+
</div>
898+
<p>Additional examples to illustrate this are in the detailed documentation for <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK</span></code>, read more about it in <a class="reference external" href="https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#affinity-mask">Level Zero Specification</a>.</p>
899+
</section>
900+
<section id="variable-ze-enable-pci-id-device-order">
901+
<h2>Variable <code class="docutils literal notranslate"><span class="pre">ZE_ENABLE_PCI_ID_DEVICE_ORDER</span></code><a class="headerlink" href="#variable-ze-enable-pci-id-device-order" title="Permalink to this heading"></a></h2>
902+
<p>Forces driver to report devices from lowest to highest PCI bus ID.</p>
903+
<div class="table-wrapper docutils container">
904+
<table class="docutils align-default">
905+
<thead>
906+
<tr class="row-odd"><th class="head"><p>Value</p></th>
907+
<th class="head"><p>Description</p></th>
908+
</tr>
909+
</thead>
910+
<tbody>
911+
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">0</span></code></p></td>
912+
<td><p>Disabled. Default value.</p></td>
913+
</tr>
914+
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">1</span></code></p></td>
915+
<td><p>Enabled.</p></td>
916+
</tr>
917+
</tbody>
918+
</table>
919+
</div>
920+
</section>
921+
<section id="variable-ze-shared-force-device-alloc">
922+
<h2>Variable <code class="docutils literal notranslate"><span class="pre">ZE_SHARED_FORCE_DEVICE_ALLOC</span></code><a class="headerlink" href="#variable-ze-shared-force-device-alloc" title="Permalink to this heading"></a></h2>
923+
<p>Forces all shared allocations into device memory</p>
924+
<div class="table-wrapper docutils container">
925+
<table class="docutils align-default">
926+
<thead>
927+
<tr class="row-odd"><th class="head"><p>Value</p></th>
928+
<th class="head"><p>Description</p></th>
929+
</tr>
930+
</thead>
931+
<tbody>
932+
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">0</span></code></p></td>
933+
<td><p>Disabled. Default value.</p></td>
934+
</tr>
935+
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">1</span></code></p></td>
936+
<td><p>Enabled.</p></td>
937+
</tr>
938+
</tbody>
939+
</table>
940+
</div>
941+
</section>
851942
</section>
852943

853944
</article>
@@ -909,6 +1000,10 @@ <h2>Variable <code class="docutils literal notranslate"><span class="pre">SYCL_P
9091000
<li><a class="reference internal" href="#variable-oneapi-device-selector">Variable <code class="docutils literal notranslate"><span class="pre">ONEAPI_DEVICE_SELECTOR</span></code></a></li>
9101001
<li><a class="reference internal" href="#variable-sycl-cache-persistent">Variable <code class="docutils literal notranslate"><span class="pre">SYCL_CACHE_PERSISTENT</span></code></a></li>
9111002
<li><a class="reference internal" href="#variable-sycl-pi-trace">Variable <code class="docutils literal notranslate"><span class="pre">SYCL_PI_TRACE</span></code></a></li>
1003+
<li><a class="reference internal" href="#variable-ze-flat-device-hierarchy">Variable <code class="docutils literal notranslate"><span class="pre">ZE_FLAT_DEVICE_HIERARCHY</span></code></a></li>
1004+
<li><a class="reference internal" href="#variable-ze-affinity-mask">Variable <code class="docutils literal notranslate"><span class="pre">ZE_AFFINITY_MASK</span></code></a></li>
1005+
<li><a class="reference internal" href="#variable-ze-enable-pci-id-device-order">Variable <code class="docutils literal notranslate"><span class="pre">ZE_ENABLE_PCI_ID_DEVICE_ORDER</span></code></a></li>
1006+
<li><a class="reference internal" href="#variable-ze-shared-force-device-alloc">Variable <code class="docutils literal notranslate"><span class="pre">ZE_SHARED_FORCE_DEVICE_ALLOC</span></code></a></li>
9121007
</ul>
9131008
</li>
9141009
</ul>

0 commit comments

Comments
 (0)