|
790 | 790 | <section id="constants"> |
791 | 791 | <span id="dpctl-constants"></span><h1>Constants<a class="headerlink" href="#constants" title="Permalink to this heading">¶</a></h1> |
792 | 792 | <p>The following constants are defined in <a class="reference internal" href="index.html#module-dpctl" title="dpctl"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dpctl</span></code></a>:</p> |
793 | | -<dl class="py data"> |
794 | | -<dt class="sig sig-object py" id="dpctl.backend_type"> |
795 | | -<span class="sig-prename descclassname"><span class="pre">dpctl.</span></span><span class="sig-name descname"><span class="pre">backend_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre"><enum</span> <span class="pre">'backend_type'></span></em><a class="reference internal" href="../../_modules/dpctl/enum_types.html#backend_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.backend_type" title="Permalink to this definition">¶</a></dt> |
796 | | -<dd><p>An <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></a> of supported SYCL backends.</p> |
797 | | -<blockquote> |
798 | | -<div><div class="line-block"> |
799 | | -<div class="line"><code class="docutils literal notranslate"><span class="pre">all</span></code></div> |
800 | | -<div class="line"><code class="docutils literal notranslate"><span class="pre">cuda</span></code></div> |
801 | | -<div class="line"><code class="docutils literal notranslate"><span class="pre">hip</span></code></div> |
802 | | -<div class="line"><code class="docutils literal notranslate"><span class="pre">level_zero</span></code></div> |
803 | | -<div class="line"><code class="docutils literal notranslate"><span class="pre">opencl</span></code></div> |
804 | | -</div> |
805 | | -</div></blockquote> |
806 | | -<dl class="field-list"> |
807 | | -<dt class="field-odd">Example<span class="colon">:</span></dt> |
808 | | -<dd class="field-odd"><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">dpctl</span> |
809 | | - |
810 | | -<span class="c1"># create a SYCL device with OpenCL backend using filter selector</span> |
811 | | -<span class="n">d</span> <span class="o">=</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">SyclDevice</span><span class="p">(</span><span class="s2">"opencl"</span><span class="p">)</span> |
812 | | -<span class="nb">print</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">backend</span><span class="p">)</span> |
813 | | -<span class="c1"># Possible output: <backend_type.opencl: 5></span> |
814 | | -</pre></div> |
815 | | -</div> |
816 | | -</dd> |
817 | | -</dl> |
818 | | -</dd></dl> |
819 | | - |
820 | 793 | <dl class="py data"> |
821 | 794 | <dt class="sig sig-object py" id="dpctl.device_type"> |
822 | 795 | <span class="sig-prename descclassname"><span class="pre">dpctl.</span></span><span class="sig-name descname"><span class="pre">device_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre"><enum</span> <span class="pre">'device_type'></span></em><a class="reference internal" href="../../_modules/dpctl/enum_types.html#device_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.device_type" title="Permalink to this definition">¶</a></dt> |
|
849 | 822 | </dl> |
850 | 823 | </dd></dl> |
851 | 824 |
|
| 825 | +<dl class="py data"> |
| 826 | +<dt class="sig sig-object py" id="dpctl.backend_type"> |
| 827 | +<span class="sig-prename descclassname"><span class="pre">dpctl.</span></span><span class="sig-name descname"><span class="pre">backend_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre"><enum</span> <span class="pre">'backend_type'></span></em><a class="reference internal" href="../../_modules/dpctl/enum_types.html#backend_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.backend_type" title="Permalink to this definition">¶</a></dt> |
| 828 | +<dd><p>An <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></a> of supported SYCL backends.</p> |
| 829 | +<blockquote> |
| 830 | +<div><div class="line-block"> |
| 831 | +<div class="line"><code class="docutils literal notranslate"><span class="pre">all</span></code></div> |
| 832 | +<div class="line"><code class="docutils literal notranslate"><span class="pre">cuda</span></code></div> |
| 833 | +<div class="line"><code class="docutils literal notranslate"><span class="pre">hip</span></code></div> |
| 834 | +<div class="line"><code class="docutils literal notranslate"><span class="pre">level_zero</span></code></div> |
| 835 | +<div class="line"><code class="docutils literal notranslate"><span class="pre">opencl</span></code></div> |
| 836 | +</div> |
| 837 | +</div></blockquote> |
| 838 | +<dl class="field-list"> |
| 839 | +<dt class="field-odd">Example<span class="colon">:</span></dt> |
| 840 | +<dd class="field-odd"><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">dpctl</span> |
| 841 | + |
| 842 | +<span class="c1"># create a SYCL device with OpenCL backend using filter selector</span> |
| 843 | +<span class="n">d</span> <span class="o">=</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">SyclDevice</span><span class="p">(</span><span class="s2">"opencl"</span><span class="p">)</span> |
| 844 | +<span class="nb">print</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">backend</span><span class="p">)</span> |
| 845 | +<span class="c1"># Possible output: <backend_type.opencl: 5></span> |
| 846 | +</pre></div> |
| 847 | +</div> |
| 848 | +</dd> |
| 849 | +</dl> |
| 850 | +</dd></dl> |
| 851 | + |
852 | 852 | <dl class="py data"> |
853 | 853 | <dt class="sig sig-object py" id="dpctl.event_status_type"> |
854 | 854 | <span class="sig-prename descclassname"><span class="pre">dpctl.</span></span><span class="sig-name descname"><span class="pre">event_status_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre"><enum</span> <span class="pre">'event_status_type'></span></em><a class="reference internal" href="../../_modules/dpctl/enum_types.html#event_status_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.event_status_type" title="Permalink to this definition">¶</a></dt> |
|
937 | 937 | <div class="toc-tree"> |
938 | 938 | <ul> |
939 | 939 | <li><a class="reference internal" href="#">Constants</a><ul> |
940 | | -<li><a class="reference internal" href="#dpctl.backend_type"><code class="docutils literal notranslate"><span class="pre">backend_type</span></code></a></li> |
941 | 940 | <li><a class="reference internal" href="#dpctl.device_type"><code class="docutils literal notranslate"><span class="pre">device_type</span></code></a></li> |
| 941 | +<li><a class="reference internal" href="#dpctl.backend_type"><code class="docutils literal notranslate"><span class="pre">backend_type</span></code></a></li> |
942 | 942 | <li><a class="reference internal" href="#dpctl.event_status_type"><code class="docutils literal notranslate"><span class="pre">event_status_type</span></code></a></li> |
943 | 943 | <li><a class="reference internal" href="#dpctl.global_mem_cache_type"><code class="docutils literal notranslate"><span class="pre">global_mem_cache_type</span></code></a></li> |
944 | 944 | </ul> |
|
0 commit comments