Obtaining Profile Data

Before performance optimization, you need to obtain accurate profile data, understand the performance status, and analyze the optimization direction. Ascend C provides multiple performance test methods, including on-board profiling and the pipeline chart for single-operator performance simulation.

On-board Profiling

The following command is an example of collecting profile data on the board for an operator. You can flexibly combine the configuration parameters as required. In the example, --output is optional, and is used to specify the path for storing the collected profile data. $HOME/projects/MyApp/out/main is the operator executable file.

msprof op --output=$HOME/projects/output $HOME/projects/MyApp/out/main

The following is an example of some profile data files:

Figure 1 Example of PipeUtilization.csv (ratio of time taken by compute units and MTEs)

For details about the fields and tool usage, see Operator Development Tools.

Operator Simulation Pipeline

The msProf tool supports profile data collection and automatic parsing in a simulation environment. For details about how to obtain the simulation pipeline by using the msProf tool, see Operator Development Tools.

The following two visualization modes are supported:

In this document, the Operator Simulation Pipeline displayed in some examples may be different from those displayed via the preceding two visualization modes. However, the key fields in the pipelines are consistent. You can view the meanings of specific fields in Operator Development Tools.