提交 db73605d 编写于 作者: Y yelihua

update profiler usage

上级 c7ffe551
......@@ -29,7 +29,7 @@ Performance data like operators' execution time is recorded in files and can be
## Preparing the Training Script
To enable the performance profiling of neural networks, MindSpore Profiler APIs should be added into the script. At first, the MindSpore `Profiler` object need to be set after set context and before the network initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results.
To enable the performance profiling of neural networks, MindSpore Profiler APIs should be added into the script. At first, the MindSpore `Profiler` object need to be set after set context and before the network and HCCL initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results.
The sample code is as follows:
......
......@@ -31,7 +31,7 @@
## 准备训练脚本
为了收集神经网络的性能数据,需要在训练脚本中添加MindSpore Profiler相关接口。
- `set_context`之后和初始化网络之前,需要初始化MindSpore `Profiler`对象。
- `set_context`之后,初始化网络和HCCL之前,需要初始化MindSpore `Profiler`对象。
- 在训练结束后,调用`Profiler.analyse()`停止性能数据收集并生成性能分析结果。
样例代码如下:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册