Skip to content

Commit 5fb236b

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 2096
1 parent ef3f641 commit 5fb236b

File tree

4 files changed

+48
-17
lines changed

4 files changed

+48
-17
lines changed

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ The following plugins from CodePlay are supported:
159159
.. _codeplay_nv_plugin: https://developer.codeplay.com/products/oneapi/nvidia/
160160
.. _codeplay_amd_plugin: https://developer.codeplay.com/products/oneapi/amd/
161161

162+
Builds for CUDA and AMD devices internally use SYCL alias targets that are passed to the compiler.
163+
A full list of available SYCL alias targets is available in the
164+
`DPC++ Compiler User Manual <https://intel.github.io/llvm/UsersManual.html>`_.
165+
166+
CUDA build
167+
~~~~~~~~~~
168+
162169
``dpctl`` can be built for CUDA devices using the ``DPCTL_TARGET_CUDA`` CMake option,
163170
which accepts a specific compute architecture string:
164171

@@ -173,19 +180,20 @@ set ``DPCTL_TARGET_CUDA`` to a value such as ``ON``, ``TRUE``, ``YES``, ``Y``, o
173180
174181
python scripts/build_locally.py --verbose --cmake-opts="-DDPCTL_TARGET_CUDA=ON"
175182
176-
Note that kernels are built for ``sm_50`` by default, allowing them to work on a wider
177-
range of architectures, but limiting the usage of more recent CUDA features.
183+
Note that kernels are built for the default architecture (``sm_50``), allowing them to work on a
184+
wider range of architectures, but limiting the usage of more recent CUDA features.
178185

179186
For reference, compute architecture strings like ``sm_80`` correspond to specific
180187
CUDA Compute Capabilities (e.g., Compute Capability 8.0 corresponds to ``sm_80``).
181188
A complete mapping between NVIDIA GPU models and their respective
182189
Compute Capabilities can be found in the official
183190
`CUDA GPU Compute Capability <https://developer.nvidia.com/cuda-gpus>`_ documentation.
184191

185-
A full list of available SYCL alias targets is available in the
186-
`DPC++ Compiler User Manual <https://intel.github.io/llvm/UsersManual.html>`_.
192+
AMD build
193+
~~~~~~~~~
187194

188-
To build for AMD devices, use:
195+
``dpctl`` can be built for AMD devices using the ``DPCTL_TARGET_HIP`` CMake option,
196+
which requires specifying a compute architecture string:
189197

190198
.. code-block:: bash
191199
@@ -194,8 +202,13 @@ To build for AMD devices, use:
194202
Note that the `oneAPI for AMD GPUs` plugin requires the architecture be specified and only
195203
one architecture can be specified at a time.
196204

197-
It is, however, possible to build for Intel devices, CUDA devices, and an AMD device
198-
architecture all at once:
205+
Multi-target build
206+
~~~~~~~~~~~~~~~~~~
207+
208+
The default ``dpctl`` build from the source enables support of Intel devices only.
209+
Extending the build with a custom SYCL target additionally enables support of CUDA or AMD
210+
device in ``dpctl``. Besides, the support can be also extended to enable both CUDA and AMD
211+
devices at the same time:
199212

200213
.. code-block:: bash
201214

pulls/2096/beginners_guides/installation.html

Lines changed: 27 additions & 9 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.0dev0+7.g2d271108d9b)"><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.0dev0+12.gb10bd1590a3)"><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>
@@ -932,6 +932,11 @@ <h3>Building for custom SYCL targets<a class="headerlink" href="#building-for-cu
932932
<li><p><a class="reference external" href="https://developer.codeplay.com/products/oneapi/amd/">oneAPI for AMD GPUs</a></p></li>
933933
</ul>
934934
</div></blockquote>
935+
<p>Builds for CUDA and AMD devices internally use SYCL alias targets that are passed to the compiler.
936+
A full list of available SYCL alias targets is available in the
937+
<a class="reference external" href="https://intel.github.io/llvm/UsersManual.html">DPC++ Compiler User Manual</a>.</p>
938+
<section id="cuda-build">
939+
<h4>CUDA build<a class="headerlink" href="#cuda-build" title="Permalink to this heading"></a></h4>
935940
<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,
936941
which accepts a specific compute architecture string:</p>
937942
<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>
@@ -942,29 +947,37 @@ <h3>Building for custom SYCL targets<a class="headerlink" href="#building-for-cu
942947
<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>
943948
</pre></div>
944949
</div>
945-
<p>Note that kernels are built for <code class="docutils literal notranslate"><span class="pre">sm_50</span></code> by default, allowing them to work on a wider
946-
range of architectures, but limiting the usage of more recent CUDA features.</p>
950+
<p>Note that kernels are built for the default architecture (<code class="docutils literal notranslate"><span class="pre">sm_50</span></code>), allowing them to work on a
951+
wider range of architectures, but limiting the usage of more recent CUDA features.</p>
947952
<p>For reference, compute architecture strings like <code class="docutils literal notranslate"><span class="pre">sm_80</span></code> correspond to specific
948953
CUDA Compute Capabilities (e.g., Compute Capability 8.0 corresponds to <code class="docutils literal notranslate"><span class="pre">sm_80</span></code>).
949954
A complete mapping between NVIDIA GPU models and their respective
950955
Compute Capabilities can be found in the official
951956
<a class="reference external" href="https://developer.nvidia.com/cuda-gpus">CUDA GPU Compute Capability</a> documentation.</p>
952-
<p>A full list of available SYCL alias targets is available in the
953-
<a class="reference external" href="https://intel.github.io/llvm/UsersManual.html">DPC++ Compiler User Manual</a>.</p>
954-
<p>To build for AMD devices, use:</p>
957+
</section>
958+
<section id="amd-build">
959+
<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>
955962
<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>
956963
</pre></div>
957964
</div>
958965
<p>Note that the <cite>oneAPI for AMD GPUs</cite> plugin requires the architecture be specified and only
959966
one architecture can be specified at a time.</p>
960-
<p>It is, however, possible to build for Intel devices, CUDA devices, and an AMD device
961-
architecture all at once:</p>
967+
</section>
968+
<section id="multi-target-build">
969+
<h4>Multi-target build<a class="headerlink" href="#multi-target-build" title="Permalink to this heading"></a></h4>
970+
<p>The default <code class="docutils literal notranslate"><span class="pre">dpctl</span></code> build from the source enables support of Intel devices only.
971+
Extending the build with a custom SYCL target additionally enables support of CUDA or AMD
972+
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
973+
devices at the same time:</p>
962974
<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>
963975
<span class="s2">-DDPCTL_TARGET_HIP=gfx1030&quot;</span>
964976
</pre></div>
965977
</div>
966978
</section>
967979
</section>
980+
</section>
968981
<section id="running-examples-and-tests">
969982
<h2>Running Examples and Tests<a class="headerlink" href="#running-examples-and-tests" title="Permalink to this heading"></a></h2>
970983
<section id="running-the-examples">
@@ -1056,7 +1069,12 @@ <h3>Running the Python Tests<a class="headerlink" href="#running-the-python-test
10561069
<li><a class="reference internal" href="#system-requirements">System requirements</a></li>
10571070
<li><a class="reference internal" href="#building-from-source">Building from source</a><ul>
10581071
<li><a class="reference internal" href="#building-locally-for-use-with-oneapi-dpc-installation">Building locally for use with oneAPI DPC++ installation</a></li>
1059-
<li><a class="reference internal" href="#building-for-custom-sycl-targets">Building for custom SYCL targets</a></li>
1072+
<li><a class="reference internal" href="#building-for-custom-sycl-targets">Building for custom SYCL targets</a><ul>
1073+
<li><a class="reference internal" href="#cuda-build">CUDA build</a></li>
1074+
<li><a class="reference internal" href="#amd-build">AMD build</a></li>
1075+
<li><a class="reference internal" href="#multi-target-build">Multi-target build</a></li>
1076+
</ul>
1077+
</li>
10601078
</ul>
10611079
</li>
10621080
<li><a class="reference internal" href="#running-examples-and-tests">Running Examples and Tests</a><ul>

pulls/2096/objects.inv

0 Bytes
Binary file not shown.

pulls/2096/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)