Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
fcbf40fa
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
23
列表
看板
标记
里程碑
合并请求
111
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FluidDoc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
23
Issue
23
列表
看板
标记
里程碑
合并请求
111
合并请求
111
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fcbf40fa
编写于
3月 03, 2020
作者:
W
wangchaochaohu
提交者:
GitHub
3月 03, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Profile chinese doc refine (#1866)
* add tracer_option in function about profiler test=develop
上级
cd3eb4d5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
4 deletion
+6
-4
doc/fluid/api_cn/profiler_cn/profiler_cn.rst
doc/fluid/api_cn/profiler_cn/profiler_cn.rst
+3
-2
doc/fluid/api_cn/profiler_cn/start_profiler_cn.rst
doc/fluid/api_cn/profiler_cn/start_profiler_cn.rst
+3
-2
未找到文件。
doc/fluid/api_cn/profiler_cn/profiler_cn.rst
浏览文件 @
fcbf40fa
...
...
@@ -3,7 +3,7 @@
profiler
-------------------------------
.. py:function:: paddle.fluid.profiler.profiler(state, sorted_key=None, profile_path='/tmp/profile')
.. py:function:: paddle.fluid.profiler.profiler(state, sorted_key=None, profile_path='/tmp/profile'
, tracer_option='Default'
)
通用性能分析器 。与 :ref:`cn_api_fluid_profiler_cuda_profiler` 不同,此分析器可用于分析CPU和GPU程序。
...
...
@@ -11,6 +11,7 @@ profiler
- **state** (str) – 性能分析状态, 取值为 'CPU' 或 'GPU' 或 'All'。'CPU'表示只分析CPU上的性能;'GPU'表示同时分析CPU和GPU上的性能;'All'表示除了同时分析CPU和GPU上的性能外,还将生成 `性能分析的时间轴信息 <../../advanced_usage/development/profiling/timeline_cn.html>`_ 。
- **sorted_key** (str,可选) – 性能分析结果的打印顺序,取值为None、'call'、'total'、'max'、'min'、'ave'之一。默认值为None,表示按照第一次结束时间顺序打印;'call'表示按调用的数量进行排序;'total'表示按总执行时间排序;'max'表示按最大执行时间排序;'min'表示按最小执行时间排序;'ave'表示按平均执行时间排序。
- **profile_path** (str,可选) – 如果性能分析状态为'All', 将生成的时间轴信息写入profile_path,默认输出文件为 ``/tmp/profile`` 。
- **tracer_option** (str,可选) – 性能分析选项取值为 'Default' 或 'OpDetail' 或 'AllOpDetail', 此选项用于设置性能分析层次并打印不同层次的性能分析结果, `Default` 选项打印不同Op类型的性能分析结果, `OpDetail` 则会打印不同OP类型更详细的性能分析结果,比如compute和data transform。 `AllOpDetail` 和 `OpDetail` 类似,但是打印的是不同Op名字的性能分析结果。
抛出异常:
- ``ValueError`` – 如果state取值不在 ['CPU', 'GPU', 'All']中,或sorted_key取值不在 [None, 'calls', 'total', 'max', 'min', 'ave']中,则抛出异常。
...
...
@@ -39,7 +40,7 @@ profiler
**结果示例**
.. code-block::
python
.. code-block::
text
#### sorted_key = 'total', 'calls', 'max', 'min', 'ave' 结果 ####
# 示例结果中,除了Sorted by number of xxx in descending order in the same thread 这句随着sorted_key变化而不同,其余均相同。
...
...
doc/fluid/api_cn/profiler_cn/start_profiler_cn.rst
浏览文件 @
fcbf40fa
...
...
@@ -3,15 +3,16 @@
start_profiler
-------------------------------
.. py:function:: paddle.fluid.profiler.start_profiler(state)
.. py:function:: paddle.fluid.profiler.start_profiler(state
, tracer_option='Default'
)
激活使用性能分析器。除了 :ref:`cn_api_fluid_profiler_profiler` 外,用户还可以使用 :ref:`cn_api_fluid_profiler_start_profiler` 和 :ref:`cn_api_fluid_profiler_stop_profiler` 来激活和停止使用性能分析器。
参数:
- **state** (str) – 性能分析状态, 取值为 'CPU' 或 'GPU' 或 'All'。'CPU'表示只分析CPU上的性能;'GPU'表示同时分析CPU和GPU上的性能;'All'表示除了同时分析CPU和GPU上的性能外,还将生成性能分析的时间轴信息 :ref:`fluid_timeline` 。
- **tracer_option** (str,可选) – 性能分析选项取值为 'Default' 或 'OpDetail' 或 'AllOpDetail', 此选项用于设置性能分析层次并打印不同层次的性能分析结果, `Default` 选项打印不同Op类型的性能分析结果, `OpDetail` 则会打印不同OP类型更详细的性能分析结果,比如compute和data transform。 `AllOpDetail` 和 `OpDetail` 类似,但是打印的是不同Op名字的性能分析结果。
抛出异常:
- ``ValueError`` – 如果state取值不在 ['CPU', 'GPU', 'All']中
,则抛出异常。
- ``ValueError`` – 如果state取值不在 ['CPU', 'GPU', 'All']中
或者tracer_option取值不在['Default', 'OpDetail', 'AllOpDetail']中,则抛出异常
**代码示例**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录