From 973cb4c305797640489beef88e1a710eb47f0b67 Mon Sep 17 00:00:00 2001 From: fuwenguang Date: Wed, 6 Apr 2022 07:18:07 +0000 Subject: [PATCH] [MLU] add mlu profiler target --- docs/api/paddle/profiler/ProfilerTarget_cn.rst | 5 +++-- docs/api/paddle/profiler/Profiler_cn.rst | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/api/paddle/profiler/ProfilerTarget_cn.rst b/docs/api/paddle/profiler/ProfilerTarget_cn.rst index c087e304046..ec418c6af1a 100644 --- a/docs/api/paddle/profiler/ProfilerTarget_cn.rst +++ b/docs/api/paddle/profiler/ProfilerTarget_cn.rst @@ -6,10 +6,11 @@ ProfilerTarget .. py:class:: paddle.profiler.ProfilerTarget -ProfilerTarget枚举类用来指定 :ref:`性能分析 ` 的设备。目前仅支持CPU和GPU。 +ProfilerTarget枚举类用来指定 :ref:`性能分析 ` 的设备。目前仅支持CPU,GPU和MLU。 设备说明 :::::::::::: - **ProfilerTarget.CPU** - 性能分析对象为CPU上的活动。 - - **ProfilerTarget.GPU** - 性能分析对象为GPU上的活动。 \ No newline at end of file + - **ProfilerTarget.GPU** - 性能分析对象为GPU上的活动。 + - **ProfilerTarget.MLU** - 性能分析对象为MLU上的活动。 diff --git a/docs/api/paddle/profiler/Profiler_cn.rst b/docs/api/paddle/profiler/Profiler_cn.rst index 238e3ae099e..2995097637a 100644 --- a/docs/api/paddle/profiler/Profiler_cn.rst +++ b/docs/api/paddle/profiler/Profiler_cn.rst @@ -10,7 +10,7 @@ Profiler 参数 ::::::::: - - **targets** (list,可选) - 指定性能分析所要分析的设备,默认会自动分析所有存在且支持的设备,当前为CPU和GPU(可选值见 :ref:`ProfilerState ` )。 + - **targets** (list,可选) - 指定性能分析所要分析的设备,默认会自动分析所有存在且支持的设备,当前支持CPU,GPU和MLU(可选值见 :ref:`ProfilerState ` )。 - **scheduler** (Callable|tuple,可选) - 如果是Callable对象,代表是性能分析器状态的调度器,该调度器会接受一个step_num参数并返回相应的状态(详情见 :ref:`状态说明 ` ),可以通过 :ref:`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 ` (./profiler_log/)。 @@ -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 \ No newline at end of file +COPY-FROM: paddle.profiler.Profiler.summary:code-example8