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
<td><p>Returns the list of <aclass="reference internal" href="dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclDevice</span></code></a> objects associated with <aclass="reference internal" href="#dpctl.SyclPlatform" title="dpctl.SyclPlatform"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclPlatform</span></code></a> instance selected based on the given <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>.</p></td>
834
+
<td><p>Returns the list of <aclass="reference internal" href="dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclDevice</span></code></a> objects associated with <aclass="reference internal" href="#dpctl.SyclPlatform" title="dpctl.SyclPlatform"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclPlatform</span></code></a> instance selected based on the given <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>.</p></td>
<spanclass="sig-prename descclassname"><spanclass="pre">dpctl.</span></span><spanclass="sig-name descname"><spanclass="pre">get_devices</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">backend</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">backend_type.all</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">device_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">device_type.all</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#dpctl.get_devices" title="Permalink to this definition">¶</a></dt>
795
795
<dd><p>Returns a list of <aclass="reference internal" href="dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclDevice</span></code></a> instances selected based on
796
-
the given <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code> and <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code> values.</p>
796
+
the given <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a> and <aclass="reference internal" href="../constants.html#dpctl.backend_type" title="dpctl.backend_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code></a> values.</p>
797
797
<p>The function is analogous to <codeclass="docutils literal notranslate"><spanclass="pre">sycl::devices::get_devices()</span></code>, but with an
798
798
additional functionality that allows filtering SYCL devices based on
799
799
<codeclass="docutils literal notranslate"><spanclass="pre">backend</span></code> in addition to only <codeclass="docutils literal notranslate"><spanclass="pre">device_type</span></code>.</p>
<li><p><strong>backend</strong> (str, <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code>, optional) – A <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code> enum value or a string that
803
+
<li><p><strong>backend</strong> (str, <aclass="reference internal" href="../constants.html#dpctl.backend_type" title="dpctl.backend_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code></a>, optional) – A <aclass="reference internal" href="../constants.html#dpctl.backend_type" title="dpctl.backend_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code></a> enum value or a string that
804
804
specifies a SYCL backend. Currently, accepted values are: “cuda”,
<li><p><strong>device_type</strong> (str, <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>, optional) – A <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code> enum value or a string that
807
+
<li><p><strong>device_type</strong> (str, <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>, optional) – A <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a> enum value or a string that
808
808
specifies a SYCL device type. Currently, accepted values are:
<ddclass="field-even"><p>A list of available <aclass="reference internal" href="dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclDevice</span></code></a> instances that
815
-
satisfy the provided <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code> and
<spanclass="sig-prename descclassname"><spanclass="pre">dpctl.</span></span><spanclass="sig-name descname"><spanclass="pre">get_num_devices</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">backend</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">backend_type.all</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">device_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">device_type.all</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#dpctl.get_num_devices" title="Permalink to this definition">¶</a></dt>
795
795
<dd><p>A helper function to return the number of SYCL devices of a given
<li><p><strong>backend</strong> (str, <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code>, optional) – A <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code> enum value or a string that
800
+
<li><p><strong>backend</strong> (str, <aclass="reference internal" href="../constants.html#dpctl.backend_type" title="dpctl.backend_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code></a>, optional) – A <aclass="reference internal" href="../constants.html#dpctl.backend_type" title="dpctl.backend_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.backend_type</span></code></a> enum value or a string that
801
801
specifies a SYCL backend. Currently, accepted values are: “cuda”,
<li><p><strong>device_type</strong> (str, <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>, optional) – A <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code> enum value or a string that
804
+
<li><p><strong>device_type</strong> (str, <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>, optional) – A <aclass="reference internal" href="../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a> enum value or a string that
805
805
specifies a SYCL device type. Currently, accepted values are:
<spanclass="sig-prename descclassname"><spanclass="pre">SyclPlatform.</span></span><spanclass="sig-name descname"><spanclass="pre">get_devices</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">device_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">device_type.all</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#dpctl.SyclPlatform.get_devices" title="Permalink to this definition">¶</a></dt>
795
795
<dd><p>Returns the list of <aclass="reference internal" href="../dpctl.SyclDevice.html#dpctl.SyclDevice" title="dpctl.SyclDevice"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclDevice</span></code></a> objects associated with
796
796
<aclass="reference internal" href="../dpctl.SyclPlatform.html#dpctl.SyclPlatform" title="dpctl.SyclPlatform"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclPlatform</span></code></a> instance selected based on
797
-
the given <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>.</p>
797
+
the given <aclass="reference internal" href="../../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>.</p>
<ddclass="field-odd"><p><strong>device_type</strong> (str, <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>, optional) – A <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code> enum value or a string that
800
+
<ddclass="field-odd"><p><strong>device_type</strong> (str, <aclass="reference internal" href="../../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>, optional) – A <aclass="reference internal" href="../../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a> enum value or a string that
801
801
specifies a SYCL device type. Currently, accepted values are:
802
802
“gpu”, “cpu”, “accelerator”, or “all”, and their equivalent
<li><p><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.13)"><strong>TypeError</strong></a> – If <cite>device_type</cite> is not a string or <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code>
815
+
<li><p><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.13)"><strong>TypeError</strong></a> – If <cite>device_type</cite> is not a string or <aclass="reference internal" href="../../constants.html#dpctl.device_type" title="dpctl.device_type"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.device_type</span></code></a>
816
816
enum.</p></li>
817
817
<li><p><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.13)"><strong>ValueError</strong></a> – If the <codeclass="docutils literal notranslate"><spanclass="pre">DPCTLPlatform_GetDevices</span></code> call returned
818
818
<codeclass="docutils literal notranslate"><spanclass="pre">NULL</span></code> instead of a <codeclass="docutils literal notranslate"><spanclass="pre">DPCTLDeviceVectorRef</span></code> object.</p></li>
0 commit comments