Skip to content

Commit f41f3ca

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 1919
1 parent b61f7d6 commit f41f3ca

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

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

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,7 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
831831
<li><p><strong>device</strong> (Optional[str, <a class="reference internal" href="dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.SyclDevice</span></code></a>, <a class="reference internal" href="dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.SyclQueue</span></code></a>, <a class="reference internal" href="../tensor.utility_functions.html#dpctl.tensor.Device" title="dpctl.tensor.Device"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.Device</span></code></a>, tuple([<a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.IntEnum</span></code></a>, int])])) – <p>Device where the output array is to be placed. <code class="docutils literal notranslate"><span class="pre">device</span></code> keyword values can be:</p>
832832
<ul>
833833
<li><dl class="simple">
834-
<dt><code class="docutils literal notranslate"><span class="pre">None</span></code></dt><dd><p>The data remains on the same device. If the data backing up
835-
input object <code class="docutils literal notranslate"><span class="pre">x</span></code> resides on <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> device, the return
836-
type would be <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>, otherwise the return
837-
type would be <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>.</p>
834+
<dt><code class="docutils literal notranslate"><span class="pre">None</span></code></dt><dd><p>The data remains on the same device.</p>
838835
</dd>
839836
</dl>
840837
</li>
@@ -865,23 +862,12 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
865862
method: an integer enumerator representing the device type followed by
866863
an integer representing the index of the device.
867864
The only supported <a class="reference internal" href="../tensor.constants.html#dpctl.tensor.DLDeviceType" title="dpctl.tensor.DLDeviceType"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.DLDeviceType</span></code></a> device types
868-
are <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> and <code class="docutils literal notranslate"><span class="pre">&quot;kDLOneAPI&quot;</span></code>. If <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> requested, the
869-
output 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>, otherwise it is
870-
<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>.</p>
865+
are <code class="docutils literal notranslate"><span class="pre">&quot;kDLCPU&quot;</span></code> and <code class="docutils literal notranslate"><span class="pre">&quot;kDLOneAPI&quot;</span></code>.</p>
871866
</dd>
872867
</dl>
873868
</li>
874869
</ul>
875870
<p>Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
876-
<div class="admonition note">
877-
<p class="admonition-title">Note</p>
878-
<p>If the return type if <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>, the associated
879-
SYCL queue is derived from the <code class="docutils literal notranslate"><span class="pre">device</span></code> keyword. When <code class="docutils literal notranslate"><span class="pre">device</span></code>
880-
keyword value has type <a class="reference internal" href="dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.SyclQueue</span></code></a>, the explicit queue
881-
instance is used, when <code class="docutils literal notranslate"><span class="pre">device</span></code> keyword value has type <a class="reference internal" href="../tensor.utility_functions.html#dpctl.tensor.Device" title="dpctl.tensor.Device"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.Device</span></code></a>,
882-
the <code class="docutils literal notranslate"><span class="pre">device.sycl_queue</span></code> is used. In all other cases, the cached
883-
SYCL queue corresponding the implied SYCL device is used.</p>
884-
</div>
885871
</p></li>
886872
<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>) – <p>Boolean indicating whether or not to copy the input.</p>
887873
<ul>
@@ -898,9 +884,25 @@ <h1>dpctl.tensor.from_dlpack<a class="headerlink" href="#dpctl-tensor-from-dlpac
898884
</ul>
899885
</dd>
900886
<dt class="field-even">Returns<span class="colon">:</span></dt>
901-
<dd class="field-even"><p>An array containing the data in <code class="docutils literal notranslate"><span class="pre">x</span></code>. When <code class="docutils literal notranslate"><span class="pre">copy</span></code> is
887+
<dd class="field-even"><p><p>An array containing the data in <code class="docutils literal notranslate"><span class="pre">x</span></code>. When <code class="docutils literal notranslate"><span class="pre">copy</span></code> is
902888
<code class="docutils literal notranslate"><span class="pre">None</span></code> or <code class="docutils literal notranslate"><span class="pre">False</span></code>, this may be a view into the original
903889
memory.</p>
890+
<p>The type of the returned object
891+
depends on where the data backing up input object <code class="docutils literal notranslate"><span class="pre">x</span></code> resides.
892+
If it resides in a USM allocation on a SYCL device, the
893+
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
894+
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+
an exception is raised.</p>
896+
<div class="admonition note">
897+
<p class="admonition-title">Note</p>
898+
<p>If the return type is <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>, the associated
899+
SYCL queue is derived from the <code class="docutils literal notranslate"><span class="pre">device</span></code> keyword. When <code class="docutils literal notranslate"><span class="pre">device</span></code>
900+
keyword value has type <a class="reference internal" href="dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.SyclQueue</span></code></a>, the explicit queue
901+
instance is used, when <code class="docutils literal notranslate"><span class="pre">device</span></code> keyword value has type <a class="reference internal" href="../tensor.utility_functions.html#dpctl.tensor.Device" title="dpctl.tensor.Device"><code class="xref py py-class docutils literal notranslate"><span class="pre">dpctl.tensor.Device</span></code></a>,
902+
the <code class="docutils literal notranslate"><span class="pre">device.sycl_queue</span></code> is used. In all other cases, the cached
903+
SYCL queue corresponding to the implied SYCL device is used.</p>
904+
</div>
905+
</p>
904906
</dd>
905907
<dt class="field-odd">Return type<span class="colon">:</span></dt>
906908
<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>

pulls/1919/objects.inv

0 Bytes
Binary file not shown.

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