Skip to content

Commit

Permalink
Merge pull request #1370 from IntelPython/feature/private_array
Browse files Browse the repository at this point in the history
Add PrivateArray kernel_api be68c49
  • Loading branch information
github-actions[bot] committed Mar 4, 2024
1 parent 960ee5c commit fc98a52
Show file tree
Hide file tree
Showing 11 changed files with 844 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dev/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8ccf7b1325d7387aedad36b4161c0c11
config: 846715c8288a13b777fdfeb90aa7eb06
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

:orphan:

numba_dpex.experimental._kernel_dpcpp_spirv_overloads._private_array_overloads
==============================================================================

.. py:module:: numba_dpex.experimental._kernel_dpcpp_spirv_overloads._private_array_overloads
.. autoapi-nested-parse::

Implements the SPIR-V overloads for the kernel_api.PrivateArray class.



Overview
--------


.. list-table:: Function
:header-rows: 0
:widths: auto
:class: summarytable

* - :py:obj:`ol_private_array_ctor <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._private_array_overloads.ol_private_array_ctor>`\ (shape, dtype)
- Overload of the constructor for the class




Functions
---------
.. py:function:: ol_private_array_ctor(shape, dtype)
Overload of the constructor for the class
class:`numba_dpex.kernel_api.PrivateArray`.

:raises errors.TypingError: If the shape argument is not a shape compatible
type.
:raises errors.TypingError: If the dtype argument is not a dtype compatible
type.





10 changes: 10 additions & 0 deletions dev/_sources/autoapi/numba_dpex/kernel_api/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Overview
- An enumeration of the supported ``sycl::memory_order`` values.
* - :py:obj:`MemoryScope <numba_dpex.kernel_api.MemoryScope>`
- An enumeration of the supported ``sycl::memory_scope`` values.
* - :py:obj:`PrivateArray <numba_dpex.kernel_api.PrivateArray>`
- The ``PrivateArray`` class is an simple version of array intended to be used
* - :py:obj:`NdRange <numba_dpex.kernel_api.NdRange>`
- A class to encapsulate all kernel launch parameters.
* - :py:obj:`Range <numba_dpex.kernel_api.Range>`
Expand Down Expand Up @@ -677,6 +679,14 @@ Classes



.. py:class:: PrivateArray(shape, dtype)
The ``PrivateArray`` class is an simple version of array intended to be used
inside kernel work item.




.. py:class:: NdRange(global_size, local_size)
A class to encapsulate all kernel launch parameters.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

:orphan:

numba_dpex.kernel_api.private_array
===================================

.. py:module:: numba_dpex.kernel_api.private_array
.. autoapi-nested-parse::

Implements a simple array intended to be used inside kernel work item.
Implementation is intended to be used in pure Python code when prototyping a
kernel function.



Overview
--------

.. list-table:: Classes
:header-rows: 0
:widths: auto
:class: summarytable

* - :py:obj:`PrivateArray <numba_dpex.kernel_api.private_array.PrivateArray>`
- The ``PrivateArray`` class is an simple version of array intended to be used




Classes
-------

.. py:class:: PrivateArray(shape, dtype)
The ``PrivateArray`` class is an simple version of array intended to be used
inside kernel work item.







Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions dev/autoapi/numba_dpex/kernel_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,13 @@ <h2>Overview<a class="headerlink" href="#overview" title="Link to this heading">
<tr class="row-odd"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.MemoryScope" title="numba_dpex.kernel_api.MemoryScope"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MemoryScope</span></code></a></p></td>
<td><p>An enumeration of the supported <code class="docutils literal notranslate"><span class="pre">sycl::memory_scope</span></code> values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.NdRange" title="numba_dpex.kernel_api.NdRange"><code class="xref py py-obj docutils literal notranslate"><span class="pre">NdRange</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.PrivateArray" title="numba_dpex.kernel_api.PrivateArray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PrivateArray</span></code></a></p></td>
<td><p>The <code class="docutils literal notranslate"><span class="pre">PrivateArray</span></code> class is an simple version of array intended to be used</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.NdRange" title="numba_dpex.kernel_api.NdRange"><code class="xref py py-obj docutils literal notranslate"><span class="pre">NdRange</span></code></a></p></td>
<td><p>A class to encapsulate all kernel launch parameters.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.Range" title="numba_dpex.kernel_api.Range"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Range</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#numba_dpex.kernel_api.Range" title="numba_dpex.kernel_api.Range"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Range</span></code></a></p></td>
<td><p>A data structure to encapsulate a single kernel launch parameter.</p></td>
</tr>
</tbody>
Expand Down Expand Up @@ -1085,6 +1088,13 @@ <h2>Classes<a class="headerlink" href="#classes" title="Link to this heading">#<

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="numba_dpex.kernel_api.PrivateArray">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PrivateArray</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shape</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dtype</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#numba_dpex.kernel_api.PrivateArray" title="Link to this definition">#</a></dt>
<dd><p>The <code class="docutils literal notranslate"><span class="pre">PrivateArray</span></code> class is an simple version of array intended to be used
inside kernel work item.</p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="numba_dpex.kernel_api.NdRange">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">NdRange</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">global_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">local_size</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#numba_dpex.kernel_api.NdRange" title="Link to this definition">#</a></dt>
Expand Down Expand Up @@ -1398,6 +1408,7 @@ <h2>Functions<a class="headerlink" href="#functions" title="Link to this heading
<li><a class="reference internal" href="#numba_dpex.kernel_api.MemoryScope.SYSTEM"><code class="docutils literal notranslate"><span class="pre">MemoryScope.SYSTEM</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#numba_dpex.kernel_api.PrivateArray"><code class="docutils literal notranslate"><span class="pre">PrivateArray</span></code></a></li>
<li><a class="reference internal" href="#numba_dpex.kernel_api.NdRange"><code class="docutils literal notranslate"><span class="pre">NdRange</span></code></a><ul>
<li><a class="reference internal" href="#numba_dpex.kernel_api.NdRange.get_global_range"><code class="docutils literal notranslate"><span class="pre">NdRange.get_global_range()</span></code></a></li>
<li><a class="reference internal" href="#numba_dpex.kernel_api.NdRange.get_local_range"><code class="docutils literal notranslate"><span class="pre">NdRange.get_local_range()</span></code></a></li>
Expand Down
Loading

0 comments on commit fc98a52

Please sign in to comment.