Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Exports profile data.
Before exporting profile data, complete the operations in Parsing Profile Data.
python3 msprof.py export timeline -dir <dir> [-reports <reports_sample_config.json>] [--iteration-id <iteration_id>] [--model-id <model-id>] [--iteration-count <iteration_count>] [--clear]
python3 msprof.py export summary -dir <dir> [--iteration-id <iteration_id>] [--model-id <model-id>] [--iteration-count <iteration_count>] [--format <export_format>] [--clear]
python3 msprof.py export db -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/HwHiAiUser/profiler_data/PROF_XXX |
Required |
-reports |
After the custom reports_sample_config.json configuration file is passed, the corresponding profile data files are exported based on the range specified in the configuration file. This parameter is implemented the same way as msprof --reports. For details, see Example (--reports). |
Optional |
--iteration-id |
Iteration ID. The value must be a positive integer. The default value is 1. This option and --model-id must be configured at the same time.
|
Optional |
--model-id |
Model ID. The value must be a positive integer. This option must be specified in combination with --iteration-id. If neither --iteration-id nor --model-id is specified, data for all model IDs is exported by default.
|
Optional |
--iteration-count |
Number of consecutive steps for which data will be exported. The value is an integer ranging from 1 to 5. The value of --iteration-id is the start step. For example, if --iteration-count is set to 3 and --iteration-id is set to 1, data for steps 1, 2, and 3 will be exported. |
Optional |
--format |
File format, either csv (default) or json. This option is supported only when the summary parameter is configured. The following uses summary files in .csv format as examples. |
Optional |
--clear |
Data clearance mode. After this option is enabled, the sqlite directory in PROF_XXX/device_{id} is deleted after profile data is exported, so as to save storage space. When this parameter is configured, the data clearance mode is enabled. This parameter is not configured by default. |
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 export timeline -dir /home/HwHiAiUser/profiler_data/PROF_XXX
python3 msprof.py export summary -dir /home/HwHiAiUser/profiler_data/PROF_XXX
python3 msprof.py export db -dir /home/HwHiAiUser/profiler_data/PROF_XXX
After the preceding command is executed, find the mindstudio_profiler_output directory and the msprof_*.db file in the PROF_XXX directory under collection-dir.
The following shows the directory structure of the generated profile data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | └── PROF_XXX ├── device_0 │ └── data ├── device_1 │ └── data ├── host │ └── data ├── msprof_*.db └── mindstudio_profiler_output ├── msprof_{timestamp}.json ├── step_trace_{timestamp}.json ├── xx_*.csv ... └── README.txt |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | └── PROF_XXX1 ├── device_0 │ └── data ├── host │ └── data ├── msprof_*.db └── mindstudio_profiler_output ├── msprof_{timestamp}.json ├── step_trace_{timestamp}.json ├── xx_*.csv ... └── README.txt └── PROF_XXX2 ├── device_1 │ └── data ├── host │ └── data ├── msprof_*.db └── mindstudio_profiler_output ├── msprof_{timestamp}.json ├── step_trace_{timestamp}.json ├── xx_*.csv ... └── README.txt |