Skip to content

Commit 9f81ac6

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 1921
1 parent c452a36 commit 9f81ac6

20 files changed

+32
-24
lines changed

pulls/1921/_modules/dpctl/tensor/_indexing_functions.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,11 @@ <h1>Source code for dpctl.tensor._indexing_functions</h1><div class="highlight">
13041304
<span class="s2">&quot;from input arguments. &quot;</span>
13051305
<span class="p">)</span>
13061306
<span class="n">mode_i</span> <span class="o">=</span> <span class="n">_get_indexing_mode</span><span class="p">(</span><span class="n">mode</span><span class="p">)</span>
1307-
<span class="n">indexes_dt</span> <span class="o">=</span> <span class="n">ti</span><span class="o">.</span><span class="n">default_device_index_type</span><span class="p">(</span><span class="n">exec_q</span><span class="o">.</span><span class="n">sycl_device</span><span class="p">)</span>
1307+
<span class="n">indexes_dt</span> <span class="o">=</span> <span class="p">(</span>
1308+
<span class="n">dpt</span><span class="o">.</span><span class="n">uint64</span>
1309+
<span class="k">if</span> <span class="n">indices</span><span class="o">.</span><span class="n">dtype</span> <span class="o">==</span> <span class="n">dpt</span><span class="o">.</span><span class="n">uint64</span>
1310+
<span class="k">else</span> <span class="n">ti</span><span class="o">.</span><span class="n">default_device_index_type</span><span class="p">(</span><span class="n">exec_q</span><span class="o">.</span><span class="n">sycl_device</span><span class="p">)</span>
1311+
<span class="p">)</span>
13081312
<span class="n">_ind</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span>
13091313
<span class="p">(</span>
13101314
<span class="n">indices</span>
@@ -1380,7 +1384,11 @@ <h1>Source code for dpctl.tensor._indexing_functions</h1><div class="highlight">
13801384
<span class="p">)</span>
13811385
<span class="n">out_usm_type</span> <span class="o">=</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">get_coerced_usm_type</span><span class="p">(</span><span class="n">usm_types_</span><span class="p">)</span>
13821386
<span class="n">mode_i</span> <span class="o">=</span> <span class="n">_get_indexing_mode</span><span class="p">(</span><span class="n">mode</span><span class="p">)</span>
1383-
<span class="n">indexes_dt</span> <span class="o">=</span> <span class="n">ti</span><span class="o">.</span><span class="n">default_device_index_type</span><span class="p">(</span><span class="n">exec_q</span><span class="o">.</span><span class="n">sycl_device</span><span class="p">)</span>
1387+
<span class="n">indexes_dt</span> <span class="o">=</span> <span class="p">(</span>
1388+
<span class="n">dpt</span><span class="o">.</span><span class="n">uint64</span>
1389+
<span class="k">if</span> <span class="n">indices</span><span class="o">.</span><span class="n">dtype</span> <span class="o">==</span> <span class="n">dpt</span><span class="o">.</span><span class="n">uint64</span>
1390+
<span class="k">else</span> <span class="n">ti</span><span class="o">.</span><span class="n">default_device_index_type</span><span class="p">(</span><span class="n">exec_q</span><span class="o">.</span><span class="n">sycl_device</span><span class="p">)</span>
1391+
<span class="p">)</span>
13841392
<span class="n">_ind</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span>
13851393
<span class="p">(</span>
13861394
<span class="n">indices</span>

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.asarray.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ <h1>dpctl.tensor.asarray<a class="headerlink" href="#dpctl-tensor-asarray" title
830830
<a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.usm_ndarray</span></code></a>,
831831
an object representing SYCL USM allocation and implementing
832832
<code class="docutils literal notranslate"><span class="pre">__sycl_usm_array_interface__</span></code> protocol, an instance
833-
of <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>, an object supporting Python buffer
833+
of <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>, an object supporting Python buffer
834834
protocol, a Python scalar, or a (possibly nested) sequence of
835835
Python scalars.</p></li>
836836
<li><p><strong>dtype</strong> (<em>data type</em><em>, </em><em>optional</em>) – output array data type. If <code class="docutils literal notranslate"><span class="pre">dtype</span></code> is

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.astype.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ <h1>dpctl.tensor.astype<a class="headerlink" href="#dpctl-tensor-astype" title="
834834
<li><p><strong>order</strong> (<em>{&quot;C&quot;</em><em>, </em><em>&quot;F&quot;</em><em>, </em><em>&quot;A&quot;</em><em>, </em><em>&quot;K&quot;}</em><em>, </em><em>optional</em>) – Controls memory layout of the resulting array if a copy
835835
is returned.</p></li>
836836
<li><p><strong>casting</strong> (<em>{'no'</em><em>, </em><em>'equiv'</em><em>, </em><em>'safe'</em><em>, </em><em>'same_kind'</em><em>, </em><em>'unsafe'}</em><em>, </em><em>optional</em>) – Controls what kind of data casting may occur. Please see
837-
<a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html#numpy.ndarray.astype" title="(in NumPy v2.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">numpy.ndarray.astype()</span></code></a> for description of casting modes.</p></li>
837+
<a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html#numpy.ndarray.astype" title="(in NumPy v2.2)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">numpy.ndarray.astype()</span></code></a> for description of casting modes.</p></li>
838838
<li><p><strong>copy</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><em>bool</em></a><em>, </em><em>optional</em>) – By default, <cite>astype</cite> always returns a newly allocated array.
839839
If this keyword is set to <cite>False</cite>, a view of the input array
840840
may be returned when possible.</p></li>

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.empty.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ <h1>dpctl.tensor.empty<a class="headerlink" href="#dpctl-tensor-empty" title="Pe
829829
<dd class="field-odd"><ul class="simple">
830830
<li><p><strong>shape</strong> (<em>Tuple</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em>]</em><em>, </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a>) – Dimensions of the array to be created.</p></li>
831831
<li><p><strong>dtype</strong> (<em>optional</em>) – data type of the array. Can be typestring,
832-
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, <a class="reference external" href="https://numpy.org/doc/stable/reference/index.html#module-numpy" title="(in NumPy v2.1)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a> char string,
832+
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, <a class="reference external" href="https://numpy.org/doc/stable/reference/index.html#module-numpy" title="(in NumPy v2.2)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a> char string,
833833
or a NumPy scalar type. The <code class="docutils literal notranslate"><span class="pre">None</span></code> value creates an
834834
array of floating point data type. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
835835
<li><p><strong>order</strong> (<code class="docutils literal notranslate"><span class="pre">&quot;C&quot;</span></code>, or <code class="docutils literal notranslate"><span class="pre">F&quot;</span></code>) – memory layout for the array. Default: <code class="docutils literal notranslate"><span class="pre">&quot;C&quot;</span></code></p></li>

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.empty_like.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ <h1>dpctl.tensor.empty_like<a class="headerlink" href="#dpctl-tensor-empty-like"
829829
<dd class="field-odd"><ul class="simple">
830830
<li><p><strong>x</strong> (<a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><em>usm_ndarray</em></a>) – Input array from which to derive the output array shape.</p></li>
831831
<li><p><strong>dtype</strong> (<em>optional</em>) – data type of the array. Can be a typestring,
832-
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, NumPy char string,
832+
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, NumPy char string,
833833
or a NumPy scalar type. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
834834
<li><p><strong>order</strong> (<em>&quot;C&quot;</em><em>, </em><em>&quot;F&quot;</em><em>, </em><em>&quot;A&quot;</em><em>, or </em><em>&quot;K&quot;</em>) – memory layout for the array. Default: <code class="docutils literal notranslate"><span class="pre">&quot;K&quot;</span></code></p></li>
835835
<li><p><strong>device</strong> (<em>optional</em>) – array API concept of device where the output array

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.eye.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ <h1>dpctl.tensor.eye<a class="headerlink" href="#dpctl-tensor-eye" title="Permal
836836
Raises <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.13)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TypeError</span></code></a> if <code class="docutils literal notranslate"><span class="pre">k</span></code> is not an integer.
837837
Default: <code class="docutils literal notranslate"><span class="pre">0</span></code></p></li>
838838
<li><p><strong>dtype</strong> (<em>optional</em>) – data type of the array. Can be typestring,
839-
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, <a class="reference external" href="https://numpy.org/doc/stable/reference/index.html#module-numpy" title="(in NumPy v2.1)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a> char string, or
839+
a <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.dtype</span></code></a> object, <a class="reference external" href="https://numpy.org/doc/stable/reference/index.html#module-numpy" title="(in NumPy v2.2)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a> char string, or
840840
a NumPy scalar type. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
841841
<li><p><strong>order</strong> (<em>&quot;C&quot;</em><em> or </em><em>&quot;F&quot;</em>) – memory layout for the array. Default: <code class="docutils literal notranslate"><span class="pre">&quot;C&quot;</span></code></p></li>
842842
<li><p><strong>device</strong> (<em>optional</em>) – array API concept of device where the output array

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.from_dlpack.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
822822
<dl class="py function">
823823
<dt class="sig sig-object py" id="dpctl.tensor.from_dlpack">
824824
<span class="sig-prename descclassname"><span class="pre">dpctl.tensor.</span></span><span class="sig-name descname"><span class="pre">from_dlpack</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">copy</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#dpctl.tensor.from_dlpack" title="Permalink to this definition"></a></dt>
825-
<dd><p>Constructs <a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.usm_ndarray</span></code></a> or <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a> instance
825+
<dd><p>Constructs <a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.usm_ndarray</span></code></a> or <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a> instance
826826
from a Python object <code class="docutils literal notranslate"><span class="pre">x</span></code> that implements <code class="docutils literal notranslate"><span class="pre">__dlpack__</span></code> protocol.</p>
827827
<dl class="field-list simple">
828828
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
@@ -892,7 +892,7 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
892892
depends on where the data backing up input object <code class="docutils literal notranslate"><span class="pre">x</span></code> resides.
893893
If it resides in a USM allocation on a SYCL device, the
894894
type <a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.usm_ndarray</span></code></a> is returned, otherwise if it resides
895-
on <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> device the type is <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>, and otherwise
895+
on <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> device the type is <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a>, and otherwise
896896
an exception is raised.</p>
897897
<div class="admonition note">
898898
<p class="admonition-title">Note</p>
@@ -906,7 +906,7 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
906906
</p>
907907
</dd>
908908
<dt class="field-odd">Return type<span class="colon">:</span></dt>
909-
<dd class="field-odd"><p>Alternative[<a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray">usm_ndarray</a>, <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)">numpy.ndarray</a>]</p>
909+
<dd class="field-odd"><p>Alternative[<a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray">usm_ndarray</a>, <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)">numpy.ndarray</a>]</p>
910910
</dd>
911911
<dt class="field-even">Raises<span class="colon">:</span></dt>
912912
<dd class="field-even"><ul class="simple">

0 commit comments

Comments
 (0)