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
<emclass="property"><spanclass="pre">class</span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">dpctl.</span></span><spanclass="sig-name descname"><spanclass="pre">SyclTimer</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">host_timer=<built-in</span><spanclass="pre">function</span><spanclass="pre">perf_counter></span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">device_timer=None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">time_scale=1</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../../../_modules/dpctl/_sycl_timer.html#SyclTimer"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#dpctl.SyclTimer" title="Permalink to this definition">¶</a></dt>
824
-
<dd><p>Context to measure device time and host wall-time of execution
825
-
of commands submitted to <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>.</p>
824
+
<dd><p>Context to time execution of tasks submitted to <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>.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">device_timer</span></code> keyword argument controls the type of tasks submitted.
872
+
With <codeclass="docutils literal notranslate"><spanclass="pre">"queue_barrier"</span></code> value, queue barrier tasks are used. With
873
+
<codeclass="docutils literal notranslate"><spanclass="pre">"order_manager"</span></code> value, a single empty body task is inserted
874
+
and order manager (used by all <cite>dpctl.tensor</cite> operations) is used to
864
875
order these tasks so that they fence operations performed within
865
876
timer’s context.</p>
877
+
<p>Timing offloading operations that do not use the order manager with
878
+
the timer that uses <codeclass="docutils literal notranslate"><spanclass="pre">"order_manager"</span></code> as <codeclass="docutils literal notranslate"><spanclass="pre">device_timer</span></code> value
879
+
will be misleading becaused the tasks submitted by the timer will not
880
+
be ordered with respect to tasks we intend to time.</p>
881
+
<p>Note, that host timer effectively measures the time of task
882
+
submissions. To measure host timer wall-time that includes execution
883
+
of submitted tasks, make sure to include synchronization point in
<li><p><strong>time_scale</strong> (<em>Union</em><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em>, </em><aclass="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><em>float</em></a><em>]</em><em>, </em><em>optional</em>) – Ratio of the unit of time of interest and one second.
905
+
<li><p><strong>time_scale</strong> (<em>Union</em><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em>, </em><aclass="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><em>float</em></a><em>]</em><em>, </em><em>optional</em>) – Ratio of one second and the unit of time-scale of interest.
<td><p>Context to measure device time and host wall-time of execution of commands submitted to <aclass="reference internal" href="generated/dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclQueue</span></code></a>.</p></td>
864
+
<td><p>Context to time execution of tasks submitted to <aclass="reference internal" href="generated/dpctl.SyclQueue.html#dpctl.SyclQueue" title="dpctl.SyclQueue"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.SyclQueue</span></code></a>.</p></td>
<h2>Installation via Intel(R) Distribution for Python<aclass="headerlink" href="#installation-via-intel-r-distribution-for-python" title="Permalink to this heading">¶</a></h2>
883
883
<p><aclass="reference external" href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html">Intel(R) Distribution for Python*</a> is distributed as a conda-based installer
884
-
and includes <aclass="reference internal" href="../api_reference/dpctl/index.html#module-dpctl" title="dpctl"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">dpctl</span></code></a> along with its dependencies and sister projects <aclass="reference external" href="https://intelpython.github.io/dpnp/overview.html#module-dpnp" title="(in Data Parallel Extension for NumPy v0.17.0dev1+21.g078d9a33a18)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">dpnp</span></code></a>
884
+
and includes <aclass="reference internal" href="../api_reference/dpctl/index.html#module-dpctl" title="dpctl"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">dpctl</span></code></a> along with its dependencies and sister projects <aclass="reference external" href="https://intelpython.github.io/dpnp/overview.html#module-dpnp" title="(in Data Parallel Extension for NumPy v0.17.0dev2)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">dpnp</span></code></a>
<p>Once the installed environment is activated, <codeclass="docutils literal notranslate"><spanclass="pre">dpctl</span></code> should be ready to use.</p>
0 commit comments