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
Copy file name to clipboardExpand all lines: python/paddle/profiler/profiler.py
+29-8Lines changed: 29 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -268,10 +268,10 @@ class Profiler:
268
268
scheduler (Callable|tuple, optional): If it is a callable object, it takes a step number as parameter and return the corresponding :ref:`ProfilerState <api_paddle_profiler_ProfilerState>`. This callable object can be generated by :ref:`make_scheduler <api_paddle_profiler_make_scheduler>` function.
269
269
If not provided (None), the default scheduler will keep tracing until the profiler exits. If it is a tuple, it has two values start_batch and end_batch,
270
270
which means profiling range [start_batch, end_batch).
271
-
on_trace_ready (callable): callable object, takes the Profiler object as parameter, which provides a way for users to do post-processing.
272
-
This callable object will be called when ``scheduler`` returns ``ProfilerState.RECORD_AND_RETURN``.
273
-
timer_only (bool): If it is True, the cost of Dataloader and every step of the model will be count without profiling. Otherwise, the model will
274
-
be timed and profiled.
271
+
on_trace_ready (Callable, optional): Callable object, serves as callback function, and takes the Profiler object as parameter, which provides a way for users to do post-processing.
272
+
This callable object will be called when ``scheduler`` returns ``ProfilerState.RECORD_AND_RETURN``. The default value is :ref:`export_chrome_tracing <api_paddle_profiler_export_chrome_tracing>` (./profiler_log/).
273
+
timer_only (bool, optional): If it is True, the cost of Dataloader and every step of the model will be count without profiling. Otherwise, the model will
274
+
be timed and profiled. Default: False.
275
275
276
276
Examples:
277
277
1. profiling range [2, 5).
@@ -322,6 +322,7 @@ class Profiler:
322
322
4. Use profiler to get throughput and cost of the model
0 commit comments