Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| analyser | 5 years ago | |
| common | 5 years ago | |
| images | 5 years ago | |
| parser | 5 years ago | |
| README.md | 5 years ago | |
| __init__.py | 5 years ago | |
| profiling.py | 5 years ago | |
MindInsight Profiler is a performance analysis tool for MindSpore. It can help to analyse and optimize the performance of the neural networks.
The Profiler enables users to:
To enable profiling on MindSpore, the MindInsight Profiler apis should be added to the script:
Import MindInsight Profiler
from mindinsight.profiler import Profiler
Initialize the Profiler before training
Example:
profiler = Profiler(output_path="./data", is_detail=True, is_show_op_path=False, subgraph='All')
Parameters including:
subgraph (str): Defines which subgraph to monitor and analyse, can be 'all', 'Default', 'Gradients'.
is_detail (bool): Whether to show profiling data for op_instance level, only show optype level if False.
is_show_op_path (bool): Whether to save the full path for each op instance.
output_path (str): Output data path.
optypes_to_deal (list): Op type names, the data of which optype should be collected and analysed,
will deal with all op if null.
optypes_not_deal (list): Op type names, the data of which optype will not be collected and analysed.
Call Profiler.analyse() at the end of the program
Profiler.analyse() will collect profiling data and generate the analysis results.
After training, we can open MindInsight UI to analyse the performance.
The operator performance analysis component is used to display the execution time of the operators during MindSpore run.
Figure 17: Statistics for Operator Types
Figure 17 displays the statistics for the operator types, including:
Figure 18: Statistics for Operators
Figure 18 displays the statistics table for the operators, including:
The Profiler has the following limitations now:
MindInsight为MindSpore提供了简单易用的调优调试能力。在训练过程中,可以将标量、张量、图像、计算图、模型超参、训练耗时等数据记录到文件中,通过MindInsight可视化页面进行查看及分析。
SVG Text Python Vue CSV other