Skip to content

Fix docstring for SyclTimer #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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