Skip to content
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

[MLU] add mlu profiler target #4467

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions docs/api/paddle/profiler/ProfilerTarget_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ ProfilerTarget
.. py:class:: paddle.profiler.ProfilerTarget


ProfilerTarget枚举类用来指定 :ref:`性能分析 <cn_api_profiler_profiler>` 的设备。目前仅支持CPU和GPU
ProfilerTarget枚举类用来指定 :ref:`性能分析 <cn_api_profiler_profiler>` 的设备。目前仅支持CPU,GPU和MLU

设备说明
::::::::::::

- **ProfilerTarget.CPU** - 性能分析对象为CPU上的活动。
- **ProfilerTarget.GPU** - 性能分析对象为GPU上的活动。
- **ProfilerTarget.GPU** - 性能分析对象为GPU上的活动。
- **ProfilerTarget.MLU** - 性能分析对象为MLU上的活动。
4 changes: 2 additions & 2 deletions docs/api/paddle/profiler/Profiler_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Profiler
参数
:::::::::

- **targets** (list,可选) - 指定性能分析所要分析的设备,默认会自动分析所有存在且支持的设备,当前为CPU和GPU(可选值见 :ref:`ProfilerState <cn_api_profiler_profilertarget>` )。
- **targets** (list,可选) - 指定性能分析所要分析的设备,默认会自动分析所有存在且支持的设备,当前支持CPU,GPU和MLU(可选值见 :ref:`ProfilerState <cn_api_profiler_profilertarget>` )。
- **scheduler** (Callable|tuple,可选) - 如果是Callable对象,代表是性能分析器状态的调度器,该调度器会接受一个step_num参数并返回相应的状态(详情见 :ref:`状态说明 <cn_api_profiler_profilerstate>` ),可以通过 :ref:`make_scheduler <cn_api_profiler_make_scheduler>` 接口生成调度器。如果没有设置这个参数(None),默认的调度器会一直让性能分析器保持RECORD状态到结束。如果是tuple类型, 有两个值start_batch和end_batch,则会在[start_batch, end_batch)(前闭后开区间)内处于RECORD状态进行性能分析。
- **on_trace_ready** (Callable,可选) - 处理性能分析器的回调函数,该回调函数接受Profiler对象作为参数,提供了一种自定义后处理的方式。当性能分析器处于RECORD_AND_RETURN状态或者结束时返回性能数据,将会调用该回调函数进行处理,默认为 :ref:`export_chrome_tracing <cn_api_profiler_export_chrome_tracing>` (./profiler_log/)。

Expand Down Expand Up @@ -102,4 +102,4 @@ summary(sorted_by=SortedKeys.CPUTotal, op_detail=True, thread_sep=False, time_un

**代码示例**

COPY-FROM: paddle.profiler.Profiler.summary:code-example8
COPY-FROM: paddle.profiler.Profiler.summary:code-example8