Skip to content

Commit 235be5b

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 2118
1 parent 1488074 commit 235be5b

File tree

6 files changed

+151
-85
lines changed

6 files changed

+151
-85
lines changed

pulls/2118/_modules/dpctl/tensor/_copy_utils.html

Lines changed: 102 additions & 63 deletions
Large diffs are not rendered by default.

pulls/2118/_sources/beginners_guides/installation.rst.txt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,27 @@ A full list of available SYCL alias targets is available in the
166166
CUDA build
167167
~~~~~~~~~~
168168

169-
``dpctl`` can be built for CUDA devices using the ``DPCTL_TARGET_CUDA`` CMake option,
170-
which accepts a specific compute architecture string:
169+
``dpctl`` can be built for CUDA devices using the ``--target-cuda`` argument.
170+
171+
To target a specific architecture (e.g., ``sm_80``):
172+
173+
.. code-block:: bash
174+
175+
python scripts/build_locally.py --verbose --target-cuda=sm_80
176+
177+
To use the default architecture (``sm_50``), omit the value:
178+
179+
.. code-block:: bash
180+
181+
python scripts/build_locally.py --verbose --target-cuda
182+
183+
Alternatively, you can use the ``DPCTL_TARGET_CUDA`` CMake option:
171184

172185
.. code-block:: bash
173186
174187
python scripts/build_locally.py --verbose --cmake-opts="-DDPCTL_TARGET_CUDA=sm_80"
175188
176-
To use the default architecture (``sm_50``),
189+
To use the default architecture (``sm_50``) with CMake options,
177190
set ``DPCTL_TARGET_CUDA`` to a value such as ``ON``, ``TRUE``, ``YES``, ``Y``, or ``1``:
178191

179192
.. code-block:: bash
@@ -192,12 +205,11 @@ Compute Capabilities can be found in the official
192205
AMD build
193206
~~~~~~~~~
194207

195-
``dpctl`` can be built for AMD devices using the ``DPCTL_TARGET_HIP`` CMake option,
196-
which requires specifying a compute architecture string:
208+
``dpctl`` can be built for AMD devices using the ``--target-hip`` argument.
197209

198210
.. code-block:: bash
199211
200-
python scripts/build_locally.py --verbose --cmake-opts="-DDPCTL_TARGET_HIP=<arch>"
212+
python scripts/build_locally.py --verbose --target-hip=<arch>
201213
202214
Note that the `oneAPI for AMD GPUs` plugin requires the architecture be specified and only
203215
one architecture can be specified at a time.
@@ -208,11 +220,17 @@ To determine the architecture code (``<arch>``) for your AMD GPU, run:
208220
rocminfo | grep 'Name: *gfx.*'
209221
210222
This will print names like ``gfx90a``, ``gfx1030``, etc.
211-
You can then use one of them as the argument to ``-DDPCTL_TARGET_HIP``.
223+
You can then use one of them as the argument to ``--target-hip``.
212224

213225
For example:
214226

215227
.. code-block:: bash
228+
python scripts/build_locally.py --verbose --target-hip=gfx1030
229+
230+
Alternatively, you can use the ``DPCTL_TARGET_HIP`` CMake option:
231+
232+
.. code-block:: bash
233+
216234
python scripts/build_locally.py --verbose --cmake-opts="-DDPCTL_TARGET_HIP=gfx1030"
217235
218236
Multi-target build
@@ -225,8 +243,7 @@ devices at the same time:
225243

226244
.. code-block:: bash
227245
228-
python scripts/build_locally.py --verbose --cmake-opts="-DDPCTL_TARGET_CUDA=ON \
229-
-DDPCTL_TARGET_HIP=gfx1030"
246+
python scripts/build_locally.py --verbose --target-cuda --target-hip=gfx1030
230247
231248
Running Examples and Tests
232249
==========================

pulls/2118/api_reference/dpctl/generated/generated/dpctl.tensor.usm_ndarray.__dlpack_device__.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,8 @@ <h1>dpctl.tensor.usm_ndarray.__dlpack_device__<a class="headerlink" href="#dpctl
807807
<p>The tuple describes the non-partitioned device where the array has been
808808
allocated, or the non-partitioned parent device of the allocation
809809
device.</p>
810-
<p>See <code class="docutils literal notranslate"><span class="pre">DLDeviceType</span></code> for a list of devices supported by the DLPack
811-
protocol.</p>
810+
<p>See <a class="reference internal" href="../../tensor.constants.html#dpctl.tensor.DLDeviceType" title="dpctl.tensor.DLDeviceType"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.DLDeviceType</span></code></a> for a list of devices supported
811+
by the DLPack protocol.</p>
812812
<dl class="field-list simple">
813813
<dt class="field-odd">Raises<span class="colon">:</span></dt>
814814
<dd class="field-odd"><p><strong>DLPackCreationError</strong> – when the <code class="docutils literal notranslate"><span class="pre">device_id</span></code> could not be determined.</p>

pulls/2118/beginners_guides/installation.html

Lines changed: 20 additions & 10 deletions
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.0dev1+15.g876e9403a7e)"><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.0dev2+1.g30918e48741)"><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>
@@ -937,12 +937,20 @@ <h3>Building for custom SYCL targets<a class="headerlink" href="#building-for-cu
937937
<a class="reference external" href="https://intel.github.io/llvm/UsersManual.html">DPC++ Compiler User Manual</a>.</p>
938938
<section id="cuda-build">
939939
<h4>CUDA build<a class="headerlink" href="#cuda-build" title="Permalink to this heading"></a></h4>
940-
<p><code class="docutils literal notranslate"><span class="pre">dpctl</span></code> can be built for CUDA devices using the <code class="docutils literal notranslate"><span class="pre">DPCTL_TARGET_CUDA</span></code> CMake option,
941-
which accepts a specific compute architecture string:</p>
940+
<p><code class="docutils literal notranslate"><span class="pre">dpctl</span></code> can be built for CUDA devices using the <code class="docutils literal notranslate"><span class="pre">--target-cuda</span></code> argument.</p>
941+
<p>To target a specific architecture (e.g., <code class="docutils literal notranslate"><span class="pre">sm_80</span></code>):</p>
942+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--target-cuda<span class="o">=</span>sm_80
943+
</pre></div>
944+
</div>
945+
<p>To use the default architecture (<code class="docutils literal notranslate"><span class="pre">sm_50</span></code>), omit the value:</p>
946+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--target-cuda
947+
</pre></div>
948+
</div>
949+
<p>Alternatively, you can use the <code class="docutils literal notranslate"><span class="pre">DPCTL_TARGET_CUDA</span></code> CMake option:</p>
942950
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--cmake-opts<span class="o">=</span><span class="s2">&quot;-DDPCTL_TARGET_CUDA=sm_80&quot;</span>
943951
</pre></div>
944952
</div>
945-
<p>To use the default architecture (<code class="docutils literal notranslate"><span class="pre">sm_50</span></code>),
953+
<p>To use the default architecture (<code class="docutils literal notranslate"><span class="pre">sm_50</span></code>) with CMake options,
946954
set <code class="docutils literal notranslate"><span class="pre">DPCTL_TARGET_CUDA</span></code> to a value such as <code class="docutils literal notranslate"><span class="pre">ON</span></code>, <code class="docutils literal notranslate"><span class="pre">TRUE</span></code>, <code class="docutils literal notranslate"><span class="pre">YES</span></code>, <code class="docutils literal notranslate"><span class="pre">Y</span></code>, or <code class="docutils literal notranslate"><span class="pre">1</span></code>:</p>
947955
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--cmake-opts<span class="o">=</span><span class="s2">&quot;-DDPCTL_TARGET_CUDA=ON&quot;</span>
948956
</pre></div>
@@ -957,26 +965,28 @@ <h4>CUDA build<a class="headerlink" href="#cuda-build" title="Permalink to this
957965
</section>
958966
<section id="amd-build">
959967
<h4>AMD build<a class="headerlink" href="#amd-build" title="Permalink to this heading"></a></h4>
960-
<p><code class="docutils literal notranslate"><span class="pre">dpctl</span></code> can be built for AMD devices using the <code class="docutils literal notranslate"><span class="pre">DPCTL_TARGET_HIP</span></code> CMake option,
961-
which requires specifying a compute architecture string:</p>
962-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--cmake-opts<span class="o">=</span><span class="s2">&quot;-DDPCTL_TARGET_HIP=&lt;arch&gt;&quot;</span>
968+
<p><code class="docutils literal notranslate"><span class="pre">dpctl</span></code> can be built for AMD devices using the <code class="docutils literal notranslate"><span class="pre">--target-hip</span></code> argument.</p>
969+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--target-hip<span class="o">=</span>&lt;arch&gt;
963970
</pre></div>
964971
</div>
965972
<p>Note that the <cite>oneAPI for AMD GPUs</cite> plugin requires the architecture be specified and only
966973
one architecture can be specified at a time.</p>
967974
<p>To determine the architecture code (<code class="docutils literal notranslate"><span class="pre">&lt;arch&gt;</span></code>) for your AMD GPU, run:</p>
968975
<p>This will print names like <code class="docutils literal notranslate"><span class="pre">gfx90a</span></code>, <code class="docutils literal notranslate"><span class="pre">gfx1030</span></code>, etc.
969-
You can then use one of them as the argument to <code class="docutils literal notranslate"><span class="pre">-DDPCTL_TARGET_HIP</span></code>.</p>
976+
You can then use one of them as the argument to <code class="docutils literal notranslate"><span class="pre">--target-hip</span></code>.</p>
970977
<p>For example:</p>
978+
<p>Alternatively, you can use the <code class="docutils literal notranslate"><span class="pre">DPCTL_TARGET_HIP</span></code> CMake option:</p>
979+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--cmake-opts<span class="o">=</span><span class="s2">&quot;-DDPCTL_TARGET_HIP=gfx1030&quot;</span>
980+
</pre></div>
981+
</div>
971982
</section>
972983
<section id="multi-target-build">
973984
<h4>Multi-target build<a class="headerlink" href="#multi-target-build" title="Permalink to this heading"></a></h4>
974985
<p>The default <code class="docutils literal notranslate"><span class="pre">dpctl</span></code> build from the source enables support of Intel devices only.
975986
Extending the build with a custom SYCL target additionally enables support of CUDA or AMD
976987
device in <code class="docutils literal notranslate"><span class="pre">dpctl</span></code>. Besides, the support can be also extended to enable both CUDA and AMD
977988
devices at the same time:</p>
978-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--cmake-opts<span class="o">=</span><span class="s2">&quot;-DDPCTL_TARGET_CUDA=ON \</span>
979-
<span class="s2">-DDPCTL_TARGET_HIP=gfx1030&quot;</span>
989+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--verbose<span class="w"> </span>--target-cuda<span class="w"> </span>--target-hip<span class="o">=</span>gfx1030
980990
</pre></div>
981991
</div>
982992
</section>

pulls/2118/objects.inv

0 Bytes
Binary file not shown.

pulls/2118/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.

0 commit comments

Comments
 (0)