You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="sig-prename descclassname"><spanclass="pre">dpctl.program.</span></span><spanclass="sig-name descname"><spanclass="pre">create_program_from_spirv</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">q</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">IL</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">copts</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">''</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#dpctl.program.create_program_from_spirv" title="Permalink to this definition">¶</a></dt>
801
801
<dd><p>Creates a Sycl interoperability program from an SPIR-V binary.</p>
802
-
<p>We use the <codeclass="xref c c-func docutils literal notranslate"><spanclass="pre">DPCTLKernelBundle_CreateFromOCLSpirv()</span></code> C API function to
803
-
create a <codeclass="docutils literal notranslate"><spanclass="pre">sycl::kernel_bundle<sycl::bundle_state::executable></span></code> object
804
-
from an compiled SPIR-V binary file.</p>
802
+
<p>We use the <codeclass="xref c c-func docutils literal notranslate"><spanclass="pre">DPCTLKernelBundle_CreateFromOCLSpirv()</span></code> C API function
803
+
to create a <codeclass="docutils literal notranslate"><spanclass="pre">sycl::kernel_bundle<sycl::bundle_state::executable></span></code>
from a Python object <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> that implements <codeclass="docutils literal notranslate"><spanclass="pre">__dlpack__</span></code> protocol.</p>
instance from a Python object <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> that implements <codeclass="docutils literal notranslate"><spanclass="pre">__dlpack__</span></code> protocol.</p>
<li><p><strong>)</strong> – <p>Device where the output array is to be placed. <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword
813
+
values can be:</p>
809
814
<ul>
810
815
<li><dlclass="simple">
811
816
<dt><codeclass="docutils literal notranslate"><spanclass="pre">None</span></code></dt><dd><p>The data remains on the same device.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">(device_type,</span><spanclass="pre">device_id)</span></code></dt><dd><p>2-tuple matching the format of the output of the<codeclass="docutils literal notranslate"><spanclass="pre">__dlpack_device__</span></code>
839
-
method: an integer enumerator representing the device type followed by
840
-
an integer representing the index of the device.
841
-
The only supported <aclass="reference internal" href="../tensor.constants.html#dpctl.tensor.DLDeviceType" title="dpctl.tensor.DLDeviceType"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.DLDeviceType</span></code></a> device types
842
-
are <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">"kDLOneAPI"</span></code>.</p>
843
+
<dt><codeclass="docutils literal notranslate"><spanclass="pre">(device_type,</span><spanclass="pre">device_id)</span></code></dt><dd><p>2-tuple matching the format of the output of the
844
+
<codeclass="docutils literal notranslate"><spanclass="pre">__dlpack_device__</span></code>method: an integer enumerator representing
845
+
the device type followed by an integer representing the index of
846
+
the device. The only supported <aclass="reference internal" href="../tensor.constants.html#dpctl.tensor.DLDeviceType" title="dpctl.tensor.DLDeviceType"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.DLDeviceType</span></code></a>
847
+
device types are <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">"kDLOneAPI"</span></code>.</p>
depends on where the data backing up input object <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> resides.
869
874
If it resides in a USM allocation on a SYCL device, the
870
-
type <aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.usm_ndarray</span></code></a> is returned, otherwise if it resides
871
-
on <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> device the type is <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, and otherwise
872
-
an exception is raised.</p>
875
+
type <aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.usm_ndarray</span></code></a> is returned, otherwise if it
876
+
resides on <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> device the type is <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>,
877
+
and otherwise an exception is raised.</p>
873
878
<divclass="admonition note">
874
879
<pclass="admonition-title">Note</p>
875
-
<p>If the return type is <aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.usm_ndarray</span></code></a>, the associated
876
-
SYCL queue is derived from the <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword. When <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code>
877
-
keyword value has type <aclass="reference internal" href="dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclQueue</span></code></a>, the explicit queue
878
-
instance is used, when <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword value has type <aclass="reference internal" href="../tensor.utility_functions.html#dpctl.tensor.Device" title="dpctl.tensor.Device"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.Device</span></code></a>,
879
-
the <codeclass="docutils literal notranslate"><spanclass="pre">device.sycl_queue</span></code> is used. In all other cases, the cached
880
+
<p>If the return type is <aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.usm_ndarray</span></code></a>, the
881
+
associated SYCL queue is derived from the <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword.
882
+
When <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword value has type <aclass="reference internal" href="dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclQueue</span></code></a>,
883
+
the explicit queue instance is used, when <codeclass="docutils literal notranslate"><spanclass="pre">device</span></code> keyword
884
+
value has type <aclass="reference internal" href="../tensor.utility_functions.html#dpctl.tensor.Device" title="dpctl.tensor.Device"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.Device</span></code></a>, the
885
+
<codeclass="docutils literal notranslate"><spanclass="pre">device.sycl_queue</span></code> is used. In all other cases, the cached
880
886
SYCL queue corresponding to the implied SYCL device is used.</p>
<dt>Specifying a collection of integral values</dt><dd><p>For each non-zero value <codeclass="docutils literal notranslate"><spanclass="pre">M</span></code> in the collection, a sub-device with <codeclass="docutils literal notranslate"><spanclass="pre">M</span></code>
851
-
compute units is created.</p>
851
+
<dt>Specifying a collection of integral values</dt><dd><p>For each non-zero value <codeclass="docutils literal notranslate"><spanclass="pre">M</span></code> in the collection, a
852
+
sub-device with <codeclass="docutils literal notranslate"><spanclass="pre">M</span></code>compute units is created.</p>
Copy file name to clipboardExpand all lines: master/api_reference/dpctl/generated/generated/dpctl.SyclDevice.sub_group_independent_forward_progress.html
<spanclass="sig-prename descclassname"><spanclass="pre">SyclDevice.</span></span><spanclass="sig-name descname"><spanclass="pre">sub_group_independent_forward_progress</span></span><aclass="headerlink" href="#dpctl.SyclDevice.sub_group_independent_forward_progress" title="Permalink to this definition">¶</a></dt>
801
-
<dd><p>Returns <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code> if the device supports independent forward progress of
802
-
sub-groups with respect to other sub-groups in the same work-group.</p>
801
+
<dd><p>Returns <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code> if the device supports independent forward progress
802
+
of sub-groups with respect to other sub-groups in the same work-group.</p>
The verbosity controls how much information is printed by the
817
-
function. Value <codeclass="docutils literal notranslate"><spanclass="pre">0</span></code> is the lowest level set by default and<codeclass="docutils literal notranslate"><spanclass="pre">2</span></code>
818
-
is the highest level to print the most verbose output.
817
+
function. Value <codeclass="docutils literal notranslate"><spanclass="pre">0</span></code> is the lowest level set by default and
818
+
<codeclass="docutils literal notranslate"><spanclass="pre">2</span></code>is the highest level to print the most verbose output.
0 commit comments