Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Queries profile data file information, including the iteration ID and model ID.
Before calling the query API, call the import command to parse the profile data. Otherwise, the query result is meaningless.
python3 msprof.py query -dir <dir>
Option |
Description |
Optional/Required |
|---|---|---|
-dir, or --collection-dir |
Directory of collected profile data. The value must be PROF_XXX or the parent directory of PROF_XXX. Example: /home/profiler_data/PROF_XXX. |
Required |
--data-type |
Type of data to be profiled. This parameter is used for interconnection with MindStudio and does not need to be configured. Possible values are as follows:
|
Optional |
--id |
Rank ID of a cluster node in the cluster scenario, and device ID in the non-cluster scenario. This parameter is used for interconnection with MindStudio and does not need to be configured. |
Optional |
--model-id |
Model ID. This parameter is used for interconnection with MindStudio and does not need to be configured. |
Optional |
--iteration-id |
Iteration ID for graph-based statistics collection. (The iteration ID is incremented by 1 each time a graph is executed. When a script is compiled into multiple graphs, the iteration ID is different from the step ID at the script layer.) The default value is 1. This parameter is used for interconnection with MindStudio and does not need to be configured. |
Optional |
-h or --help |
Help information. |
Optional |
${INSTALL_DIR}/tools/profiler/profiler_tool/analysis/msprof. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
python3 msprof.py query -dir /home/profiler_data/PROF_XXX
After the command for querying profile data is executed, the results will be printed and displayed.
Table 2 describes the information obtained by the query function of the msprof tool.
Field |
Description |
|---|---|
Job Info |
Job name. |
Device ID |
Device ID. |
Dir Name |
Folder name. |
Collection Time |
Profiling time. |
Model ID |
Model ID. |
Iteration Number |
Total number of iterations. |
Top Time Iteration |
Top five iterations with the longest time consumptions. |
Rank ID |
Node ID in the cluster scenario. |