Skip to content

Commit

Permalink
Fix docstring for SyclTimer (#824)
Browse files Browse the repository at this point in the history
* Fix docstring for SyclTimer

* Expanded remark in SyclTimer docstring
  • Loading branch information
oleksandr-pavlyk authored Apr 28, 2022
1 parent 2abb03c commit 8ad3e1c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions dpctl/_sycl_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,19 @@ class SyclTimer:
sycl_dt, wall_dt = timer.dt
Remark:
The timer synchronizes the queue at the entrance and the
exit of the context.
The timer submits barriers to the queue at the entrance and the
exit of the context and uses profiling information from events
associated with these submissions to perform the timing. Thus
:class:`dpctl.SyclTimer` requires the queue with "enable_profiling"
property. In order to be able to collect the profiling information
the property `dt` ensures that both submitted barriers complete
their execution and thus effectively synchronizing the queue.
Args:
host_timer (callable): A callable such that host_timer() returns current
host time in seconds.
time_scale (int, float): Ratio of the unit of time of interest and
one second.
host_timer (callable): A callable such that host_timer() returns current
host time in seconds.
time_scale (int, float): Ratio of the unit of time of interest and
one second.
"""

def __init__(self, host_timer=timeit.default_timer, time_scale=1):
Expand Down

0 comments on commit 8ad3e1c

Please sign in to comment.