Skip to content

Commit f4f2371

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 2304
1 parent 2d1e437 commit f4f2371

9 files changed

Lines changed: 969 additions & 7 deletions

File tree

pulls/2304/_modules/dpctl/program/utils/_utils.html

Lines changed: 859 additions & 0 deletions
Large diffs are not rendered by default.

pulls/2304/_modules/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ <h1>All modules for which code is available</h1>
626626
<li><a href="dpctl/enum_types.html">dpctl.enum_types</a></li>
627627
<li><a href="dpctl/memory/_memory.html">dpctl.memory._memory</a></li>
628628
<li><a href="dpctl/program/_program.html">dpctl.program._program</a></li>
629+
<li><a href="dpctl/program/utils/_utils.html">dpctl.program.utils._utils</a></li>
629630
<li><a href="dpctl/utils/_intel_device_info.html">dpctl.utils._intel_device_info</a></li>
630631
<li><a href="dpctl/utils/_onetrace_context.html">dpctl.utils._onetrace_context</a></li>
631632
</ul></ul>

pulls/2304/_sources/api_reference/dpctl/program.rst.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,15 @@ execution via :py:meth:`dpctl.SyclQueue.submit`.
3737
:nosignatures:
3838

3939
SyclKernelBundleCompilationError
40+
41+
:py:mod:`dpctl.program.utils`
42+
-----------------------------
43+
44+
.. py:module:: dpctl.program.utils
45+
46+
.. currentmodule:: dpctl.program.utils
47+
48+
.. autofunction:: parse_spirv_specializations
49+
50+
.. autoclass:: SpecializationConstantInfo
51+
:members:

pulls/2304/api_reference/dpctl/program.html

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
186186
</button>
187187
</div>
188-
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
188+
<label class="toc-overlay-icon toc-header-icon" for="__toc">
189189
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
190190
</label>
191191
</div>
@@ -615,7 +615,7 @@
615615
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
616616
</button>
617617
</div>
618-
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
618+
<label class="toc-overlay-icon toc-content-icon" for="__toc">
619619
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
620620
</label>
621621
</div>
@@ -668,6 +668,57 @@
668668
</tbody>
669669
</table>
670670
</div>
671+
<section id="module-dpctl.program.utils">
672+
<span id="dpctl-program-utils"></span><h2><a class="reference internal" href="#module-dpctl.program.utils" title="dpctl.program.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.program.utils</span></code></a><a class="headerlink" href="#module-dpctl.program.utils" title="Permalink to this heading"></a></h2>
673+
<dl class="py function">
674+
<dt class="sig sig-object py" id="dpctl.program.utils.parse_spirv_specializations">
675+
<span class="sig-prename descclassname"><span class="pre">dpctl.program.utils.</span></span><span class="sig-name descname"><span class="pre">parse_spirv_specializations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">spv_bytes</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.14)"><span class="pre">bytes</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytearray" title="(in Python v3.14)"><span class="pre">bytearray</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#memoryview" title="(in Python v3.14)"><span class="pre">memoryview</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><span class="pre">dpctl.program.utils._utils.SpecializationConstantInfo</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../_modules/dpctl/program/utils/_utils.html#parse_spirv_specializations"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.program.utils.parse_spirv_specializations" title="Permalink to this definition"></a></dt>
676+
<dd><p>Parses SPIR-V byte stream to extract information about specializations,
677+
including the specialization IDs, types, names, and default values.</p>
678+
<p>Note that the dtype information may be imprecise, as the compiler may
679+
choose to, for example, represent a bool as char, or may represent both
680+
signed and unsigned integers as unsigned integer bit buckets of the same
681+
length.</p>
682+
<dl class="field-list simple">
683+
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
684+
<dd class="field-odd"><p><strong>spv_bytes</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.14)"><em>bytes</em></a><em> | </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytearray" title="(in Python v3.14)"><em>bytearray</em></a><em> | </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#memoryview" title="(in Python v3.14)"><em>memoryview</em></a>) – the SPIR-V byte stream.</p>
685+
</dd>
686+
<dt class="field-even">Returns<span class="colon">:</span></dt>
687+
<dd class="field-even"><p><p>a tuple of parsed constants and their information represented by
688+
<cite>SpecializationConstantInfo</cite> objects, sorted by their
689+
specialization IDs. The length of the tuple is equal to the number
690+
of specialization constants found. Each
691+
<cite>SpecializationConstantInfo</cite> object contains the following
692+
attributes:</p>
693+
<ul class="simple">
694+
<li><p><cite>spec_id</cite> (int): The specialization ID.</p></li>
695+
<li><p><cite>dtype</cite> (str): A NumPy style string representing the data type.</p></li>
696+
<li><dl class="simple">
697+
<dt><cite>itemsize</cite> (int): The size of the specialization constant in</dt><dd><p>bytes.</p>
698+
</dd>
699+
</dl>
700+
</li>
701+
<li><dl class="simple">
702+
<dt><cite>name</cite> (str): The variable name. If not preserved in the binary,</dt><dd><p>a default name in the format <cite>unnamed_spec_const_{spec_id}</cite> is
703+
used.</p>
704+
</dd>
705+
</dl>
706+
</li>
707+
<li><dl class="simple">
708+
<dt><cite>default_value</cite> (int | float | bool | None): The default value of</dt><dd><p>the specialization constant. If not specified, <cite>None</cite> is used.</p>
709+
</dd>
710+
</dl>
711+
</li>
712+
</ul>
713+
</p>
714+
</dd>
715+
<dt class="field-odd">Return type<span class="colon">:</span></dt>
716+
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)">tuple</a>[SpecializationConstantInfo]</p>
717+
</dd>
718+
</dl>
719+
</dd></dl>
720+
721+
</section>
671722
</section>
672723

673724
</article>
@@ -713,9 +764,31 @@
713764

714765
</footer>
715766
</div>
716-
<aside class="toc-drawer no-toc">
767+
<aside class="toc-drawer">
717768

718769

770+
<div class="toc-sticky toc-scroll">
771+
<div class="toc-title-container">
772+
<span class="toc-title">
773+
On this page
774+
</span>
775+
</div>
776+
<div class="toc-tree-container">
777+
<div class="toc-tree">
778+
<ul>
779+
<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.program</span></code></a><ul>
780+
<li><a class="reference internal" href="#module-dpctl.program.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.program.utils</span></code></a><ul>
781+
<li><a class="reference internal" href="#dpctl.program.utils.parse_spirv_specializations"><code class="docutils literal notranslate"><span class="pre">parse_spirv_specializations()</span></code></a></li>
782+
</ul>
783+
</li>
784+
</ul>
785+
</li>
786+
</ul>
787+
788+
</div>
789+
</div>
790+
</div>
791+
719792

720793
</aside>
721794
</div>

pulls/2304/beginners_guides/installation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ <h2>Installation using pip<a class="headerlink" href="#installation-using-pip" t
690690
<section id="installation-via-intel-r-distribution-for-python">
691691
<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>
692692
<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
693-
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.21.0dev0+43.g92d2c81563)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpnp</span></code></a>
693+
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.21.0dev0+65.gffccc2ee6d7)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpnp</span></code></a>
694694
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>
695695
<p>Once the installed environment is activated, <code class="docutils literal notranslate"><span class="pre">dpctl</span></code> should be ready to use.</p>
696696
</section>

pulls/2304/genindex.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,13 @@ <h2>D</h2>
807807

808808
<ul>
809809
<li><a href="api_reference/dpctl/program.html#module-dpctl.program">module</a>
810+
</li>
811+
</ul></li>
812+
<li>
813+
dpctl.program.utils
814+
815+
<ul>
816+
<li><a href="api_reference/dpctl/program.html#module-dpctl.program.utils">module</a>
810817
</li>
811818
</ul></li>
812819
<li>
@@ -949,15 +956,15 @@ <h2>D</h2>
949956
<li><a href="api_reference/libsyclinterface/generated/global.html#index-21">function</a>
950957
</li>
951958
</ul></li>
959+
</ul></td>
960+
<td style="width: 33%; vertical-align: top;"><ul>
952961
<li>
953962
DPCTLDevice_GetMaxMemAllocSize
954963

955964
<ul>
956965
<li><a href="api_reference/libsyclinterface/generated/global.html#index-22">function</a>
957966
</li>
958967
</ul></li>
959-
</ul></td>
960-
<td style="width: 33%; vertical-align: top;"><ul>
961968
<li>
962969
DPCTLDevice_GetMaxReadImageArgs
963970

@@ -1572,6 +1579,8 @@ <h2>M</h2>
15721579
<li><a href="api_reference/dpctl/memory.html#module-dpctl.memory">dpctl.memory</a>
15731580
</li>
15741581
<li><a href="api_reference/dpctl/program.html#module-dpctl.program">dpctl.program</a>
1582+
</li>
1583+
<li><a href="api_reference/dpctl/program.html#module-dpctl.program.utils">dpctl.program.utils</a>
15751584
</li>
15761585
<li><a href="api_reference/dpctl/utils.html#module-dpctl.utils">dpctl.utils</a>
15771586
</li>
@@ -1653,6 +1662,8 @@ <h2>P</h2>
16531662
</li>
16541663
</ul></li>
16551664
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclDevice.parent_device.html#dpctl.SyclDevice.parent_device">parent_device (dpctl.SyclDevice attribute)</a>
1665+
</li>
1666+
<li><a href="api_reference/dpctl/program.html#dpctl.program.utils.parse_spirv_specializations">parse_spirv_specializations() (in module dpctl.program.utils)</a>
16561667
</li>
16571668
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclDevice.partition_max_sub_devices.html#dpctl.SyclDevice.partition_max_sub_devices">partition_max_sub_devices (dpctl.SyclDevice attribute)</a>
16581669
</li>

pulls/2304/objects.inv

32 Bytes
Binary file not shown.

pulls/2304/py-modindex.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,12 @@ <h1>Python Module Index</h1>
643643
<a href="api_reference/dpctl/program.html#module-dpctl.program"><code class="xref">dpctl.program</code></a></td><td>
644644
<em></em></td>
645645
</tr>
646+
<tr class="cg-1">
647+
<td></td>
648+
<td>&#160;&#160;&#160;
649+
<a href="api_reference/dpctl/program.html#module-dpctl.program.utils"><code class="xref">dpctl.program.utils</code></a></td><td>
650+
<em></em></td>
651+
</tr>
646652
<tr class="cg-1">
647653
<td></td>
648654
<td>&#160;&#160;&#160;

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