Skip to content

Commit

Permalink
add custom profiler doc (PaddlePaddle#5470)
Browse files Browse the repository at this point in the history
* add custom profiler doc

* Update Profiler_cn.rst

Co-authored-by: Ligoml <[email protected]>
  • Loading branch information
ronny1996 and Ligoml authored Dec 2, 2022
1 parent cf3e64f commit 03e8b83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/api/paddle/profiler/Profiler_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Profiler
---------------------

.. py:class:: paddle.profiler.Profiler(*, targets: Optional[Iterable[ProfilerTarget]]=None, scheduler: Union[Callable[[int], ProfilerState], tuple, None]=None, on_trace_ready: Optional[Callable[..., Any]]=None, record_shapes: Optional[bool] = False, profile_memory: Optional[bool] = False, timer_only: Optional[bool]=False, with_flops: Optional[bool] = False)
.. py:class:: paddle.profiler.Profiler(*, targets: Optional[Iterable[ProfilerTarget]]=None, scheduler: Union[Callable[[int], ProfilerState], tuple, None]=None, on_trace_ready: Optional[Callable[..., Any]]=None, record_shapes: Optional[bool] = False, profile_memory: Optional[bool] = False, timer_only: Optional[bool]=False, custom_device_types: Optional[list] = [], with_flops: Optional[bool] = False)
性能分析器,该类负责管理性能分析的启动、关闭,以及性能数据的导出和统计分析。

Expand All @@ -16,6 +16,7 @@ Profiler
- **record_shapes** (bool,可选) - 如果设置为 True, 则会开启收集框架算子输入张量的 shape,默认为 False。
- **profile_memory** (bool,可选) - 如果设置为 True, 则会开启收集显存分析的数据,默认为 False。
- **timer_only** (bool,可选) - 如果设置为 True,将只统计模型的数据读取和每一个迭代所消耗的时间,而不进行性能分析。否则,模型将被计时,同时进行性能分析。默认值:False。
- **custom_device_types** (list,可选) - 如果 targets 包含 profiler.ProfilerTarget.CUSTOM_DEVICE,custom_device_types 选择进行性能分析的设备类型,默认值为空表示所有自定义设备。
- **with_flops** (bool,可选) - 如果设置为 True,则会开启收集相关数据计算 FLOPs 指标。默认值:False。

代码示例 1
Expand Down

0 comments on commit 03e8b83

Please sign in to comment.