Querying Profile Data File Information
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Queries profile data file information, including the iteration ID and model ID.
Precautions
Before calling the query API, call the import command to parse the profile data. Otherwise, the query result is meaningless.
Command Format
python3 msprof.py query -dir <dir>
Command-line Options
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 |
Data type. 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 |
Example
- Log in to the environment where the Toolkit package is installed.
- Switch to the directory where the msprof.py script is located.
${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.
- To query the profile data information, run the following command.
python3 msprof.py query -dir /home/profiler_data/PROF_XXX
Output Description
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. |