Skip to content

Commit 25f7068

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 2317
1 parent 25d9627 commit 25f7068

8 files changed

Lines changed: 1049 additions & 20 deletions

File tree

pulls/2317/_modules/dpctl/compiler/utils/_utils.html

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

pulls/2317/_modules/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ <h1>All modules for which code is available</h1>
702702
<li><a href="dpctl/_sycl_queue.html">dpctl._sycl_queue</a></li>
703703
<li><a href="dpctl/_sycl_timer.html">dpctl._sycl_timer</a></li>
704704
<li><a href="dpctl/compiler/_compiler.html">dpctl.compiler._compiler</a></li>
705+
<li><a href="dpctl/compiler/utils/_utils.html">dpctl.compiler.utils._utils</a></li>
705706
<li><a href="dpctl/enum_types.html">dpctl.enum_types</a></li>
706707
<li><a href="dpctl/memory/_memory.html">dpctl.memory._memory</a></li>
707708
<li><a href="dpctl/program/_program.html">dpctl.program._program</a></li>

pulls/2317/_sources/api_reference/dpctl/compiler.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ execution via :py:meth:`dpctl.SyclQueue.submit`.
3939

4040
SyclKernelBundleCompilationError
4141

42-
:py:mod:`dpctl.program.utils`
42+
:py:mod:`dpctl.compiler.utils`
4343
-----------------------------
4444

45-
.. py:module:: dpctl.program.utils
45+
.. py:module:: dpctl.compiler.utils
4646
47-
.. currentmodule:: dpctl.program.utils
47+
.. currentmodule:: dpctl.compiler.utils
4848

4949
.. autofunction:: parse_spirv_specializations
5050

pulls/2317/api_reference/dpctl/compiler.html

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,62 @@
749749
</tbody>
750750
</table>
751751
</div>
752-
<section id="module-dpctl.program.utils">
753-
<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>
752+
<section id="dpctl-compiler-utils">
753+
<h2><a class="reference internal" href="#module-dpctl.compiler.utils" title="dpctl.compiler.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.compiler.utils</span></code></a><a class="headerlink" href="#dpctl-compiler-utils" title="Permalink to this heading"></a></h2>
754+
<span class="target" id="module-dpctl.compiler.utils"></span><dl class="py function">
755+
<dt class="sig sig-object py" id="dpctl.compiler.utils.parse_spirv_specializations">
756+
<span class="sig-prename descclassname"><span class="pre">dpctl.compiler.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><a class="reference internal" href="#dpctl.compiler.utils.SpecializationConstantInfo" title="dpctl.compiler.utils._utils.SpecializationConstantInfo"><span class="pre">dpctl.compiler.utils._utils.SpecializationConstantInfo</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../_modules/dpctl/compiler/utils/_utils.html#parse_spirv_specializations"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.compiler.utils.parse_spirv_specializations" title="Permalink to this definition"></a></dt>
757+
<dd><p>Parses SPIR-V byte stream to extract information about specializations,
758+
including the specialization IDs, types, names, and default values.</p>
759+
<p>Note that the dtype information may be imprecise, as the compiler may
760+
choose to, for example, represent a bool as char, or may represent both
761+
signed and unsigned integers as unsigned integer bit buckets of the same
762+
length.</p>
763+
<dl class="field-list simple">
764+
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
765+
<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>
766+
</dd>
767+
<dt class="field-even">Returns<span class="colon">:</span></dt>
768+
<dd class="field-even"><p><p>a tuple of parsed constants and their information represented by
769+
<cite>SpecializationConstantInfo</cite> objects, sorted by their
770+
specialization IDs. The length of the tuple is equal to the number
771+
of specialization constants found. Each
772+
<cite>SpecializationConstantInfo</cite> object contains the following
773+
attributes:</p>
774+
<ul class="simple">
775+
<li><p><cite>spec_id</cite> (int): The specialization ID.</p></li>
776+
<li><p><cite>dtype</cite> (str): A NumPy style string representing the data type.</p></li>
777+
<li><dl class="simple">
778+
<dt><cite>itemsize</cite> (int): The size of the specialization constant in</dt><dd><p>bytes.</p>
779+
</dd>
780+
</dl>
781+
</li>
782+
<li><dl class="simple">
783+
<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
784+
used.</p>
785+
</dd>
786+
</dl>
787+
</li>
788+
<li><dl class="simple">
789+
<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>
790+
</dd>
791+
</dl>
792+
</li>
793+
</ul>
794+
</p>
795+
</dd>
796+
<dt class="field-odd">Return type<span class="colon">:</span></dt>
797+
<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>[<a class="reference internal" href="#dpctl.compiler.utils.SpecializationConstantInfo" title="dpctl.compiler.utils.SpecializationConstantInfo">SpecializationConstantInfo</a>]</p>
798+
</dd>
799+
</dl>
800+
</dd></dl>
801+
802+
<dl class="py class">
803+
<dt class="sig sig-object py" id="dpctl.compiler.utils.SpecializationConstantInfo">
804+
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">dpctl.compiler.utils.</span></span><span class="sig-name descname"><span class="pre">SpecializationConstantInfo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">spec_id</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/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">dtype</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#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</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#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">itemsize</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/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default_value</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/functions.html#int" title="(in Python v3.14)"><span class="pre">int</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/functions.html#float" title="(in Python v3.14)"><span class="pre">float</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/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</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/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/dpctl/compiler/utils/_utils.html#SpecializationConstantInfo"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.compiler.utils.SpecializationConstantInfo" title="Permalink to this definition"></a></dt>
805+
<dd><p>Data class representing specialization constant information.</p>
806+
</dd></dl>
807+
754808
</section>
755809
</section>
756810

@@ -810,7 +864,11 @@
810864
<div class="toc-tree">
811865
<ul>
812866
<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.compiler</span></code></a><ul>
813-
<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></li>
867+
<li><a class="reference internal" href="#dpctl-compiler-utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl.compiler.utils</span></code></a><ul>
868+
<li><a class="reference internal" href="#dpctl.compiler.utils.parse_spirv_specializations"><code class="docutils literal notranslate"><span class="pre">parse_spirv_specializations()</span></code></a></li>
869+
<li><a class="reference internal" href="#dpctl.compiler.utils.SpecializationConstantInfo"><code class="docutils literal notranslate"><span class="pre">SpecializationConstantInfo</span></code></a></li>
870+
</ul>
871+
</li>
814872
</ul>
815873
</li>
816874
</ul>

pulls/2317/genindex.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -931,24 +931,24 @@ <h2>D</h2>
931931
</li>
932932
</ul></li>
933933
<li>
934-
dpctl.memory
934+
dpctl.compiler.utils
935935

936936
<ul>
937-
<li><a href="api_reference/dpctl/memory.html#module-dpctl.memory">module</a>
937+
<li><a href="api_reference/dpctl/compiler.html#module-dpctl.compiler.utils">module</a>
938938
</li>
939939
</ul></li>
940940
<li>
941-
dpctl.program
941+
dpctl.memory
942942

943943
<ul>
944-
<li><a href="api_reference/dpctl/program.html#module-dpctl.program">module</a>
944+
<li><a href="api_reference/dpctl/memory.html#module-dpctl.memory">module</a>
945945
</li>
946946
</ul></li>
947947
<li>
948-
dpctl.program.utils
948+
dpctl.program
949949

950950
<ul>
951-
<li><a href="api_reference/dpctl/compiler.html#module-dpctl.program.utils">module</a>
951+
<li><a href="api_reference/dpctl/program.html#module-dpctl.program">module</a>
952952
</li>
953953
</ul></li>
954954
<li>
@@ -1845,12 +1845,12 @@ <h2>M</h2>
18451845
<li><a href="api_reference/dpctl/index.html#module-dpctl">dpctl</a>
18461846
</li>
18471847
<li><a href="api_reference/dpctl/compiler.html#module-dpctl.compiler">dpctl.compiler</a>
1848+
</li>
1849+
<li><a href="api_reference/dpctl/compiler.html#module-dpctl.compiler.utils">dpctl.compiler.utils</a>
18481850
</li>
18491851
<li><a href="api_reference/dpctl/memory.html#module-dpctl.memory">dpctl.memory</a>
18501852
</li>
18511853
<li><a href="api_reference/dpctl/program.html#module-dpctl.program">dpctl.program</a>
1852-
</li>
1853-
<li><a href="api_reference/dpctl/compiler.html#module-dpctl.program.utils">dpctl.program.utils</a>
18541854
</li>
18551855
<li><a href="api_reference/dpctl/utils.html#module-dpctl.utils">dpctl.utils</a>
18561856
</li>
@@ -1938,6 +1938,8 @@ <h2>P</h2>
19381938
</li>
19391939
</ul></li>
19401940
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclDevice.parent_device.html#dpctl.SyclDevice.parent_device">parent_device (dpctl.SyclDevice attribute)</a>
1941+
</li>
1942+
<li><a href="api_reference/dpctl/compiler.html#dpctl.compiler.utils.parse_spirv_specializations">parse_spirv_specializations() (in module dpctl.compiler.utils)</a>
19411943
</li>
19421944
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclDevice.partition_affinity_domains.html#dpctl.SyclDevice.partition_affinity_domains">partition_affinity_domains (dpctl.SyclDevice attribute)</a>
19431945
</li>
@@ -1974,14 +1976,14 @@ <h2>P</h2>
19741976
</li>
19751977
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclQueue.prefetch.html#dpctl.SyclQueue.prefetch">prefetch() (dpctl.SyclQueue method)</a>
19761978
</li>
1979+
</ul></td>
1980+
<td style="width: 33%; vertical-align: top;"><ul>
19771981
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclDevice.print_device_info.html#dpctl.SyclDevice.print_device_info">print_device_info() (dpctl.SyclDevice method)</a>
19781982

19791983
<ul>
19801984
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclQueue.print_device_info.html#dpctl.SyclQueue.print_device_info">(dpctl.SyclQueue method)</a>
19811985
</li>
19821986
</ul></li>
1983-
</ul></td>
1984-
<td style="width: 33%; vertical-align: top;"><ul>
19851987
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclPlatform.print_platform_info.html#dpctl.SyclPlatform.print_platform_info">print_platform_info() (dpctl.SyclPlatform method)</a>
19861988
</li>
19871989
<li><a href="api_reference/dpctl/generated/generated/dpctl.SyclEvent.profiling_info_end.html#dpctl.SyclEvent.profiling_info_end">profiling_info_end (dpctl.SyclEvent attribute)</a>
@@ -2078,6 +2080,8 @@ <h2>S</h2>
20782080
</li>
20792081
</ul></li>
20802082
<li><a href="api_reference/dpctl/generated/dpctl.compiler.SpecializationConstant.html#dpctl.compiler.SpecializationConstant">SpecializationConstant (class in dpctl.compiler)</a>
2083+
</li>
2084+
<li><a href="api_reference/dpctl/compiler.html#dpctl.compiler.utils.SpecializationConstantInfo">SpecializationConstantInfo (class in dpctl.compiler.utils)</a>
20812085
</li>
20822086
<li>
20832087
struct

pulls/2317/objects.inv

41 Bytes
Binary file not shown.

pulls/2317/py-modindex.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,19 +718,19 @@ <h1>Python Module Index</h1>
718718
<tr class="cg-1">
719719
<td></td>
720720
<td>&#160;&#160;&#160;
721-
<a href="api_reference/dpctl/memory.html#module-dpctl.memory"><code class="xref">dpctl.memory</code></a></td><td>
721+
<a href="api_reference/dpctl/compiler.html#module-dpctl.compiler.utils"><code class="xref">dpctl.compiler.utils</code></a></td><td>
722722
<em></em></td>
723723
</tr>
724724
<tr class="cg-1">
725725
<td></td>
726726
<td>&#160;&#160;&#160;
727-
<a href="api_reference/dpctl/program.html#module-dpctl.program"><code class="xref">dpctl.program</code></a></td><td>
727+
<a href="api_reference/dpctl/memory.html#module-dpctl.memory"><code class="xref">dpctl.memory</code></a></td><td>
728728
<em></em></td>
729729
</tr>
730730
<tr class="cg-1">
731731
<td></td>
732732
<td>&#160;&#160;&#160;
733-
<a href="api_reference/dpctl/compiler.html#module-dpctl.program.utils"><code class="xref">dpctl.program.utils</code></a></td><td>
733+
<a href="api_reference/dpctl/program.html#module-dpctl.program"><code class="xref">dpctl.program</code></a></td><td>
734734
<em></em></td>
735735
</tr>
736736
<tr class="cg-1">

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