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">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>
823
+
<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 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
875
+
order these tasks so that they fence operations performed within
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.
<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>
0 commit comments