Parsing Profile Data
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Parses profile data.
Precautions
None.
Command Format
python3 msprof.py import -dir <dir>
Command-line Options
Option |
Description |
Optional/Required |
|---|---|---|
import |
Parse profile data in import mode. When the profile data is parsed in the import mode, a .db file is generated even if there is an existing .db file in the original profile data directory. |
Required |
--cluster |
Parses and summarizes profile data in the cluster scenario. This option is supported only when the import parameter is configured. The -dir parameter specifies the parent directory of PROF_XXX. The parsing result is stored in the sqlite directory generated under PROF_XXX. |
This option is mandatory in the cluster scenario. |
-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 |
-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.
- Parse the profile data.
python3 msprof.py import -dir /home/profiler_data/PROF_XXX
Table 2 Parsing command options Option
Description
Optional/Required
import
Parse profile data in import mode.
When the profile data is parsed in the import mode, a .db file is generated even if there is an existing .db file in the original profile data directory.
Required
--cluster
Parses and summarizes profile data in the cluster scenario. This option is supported only when the import parameter is configured.
The -dir parameter specifies the parent directory of PROF_XXX. The parsing result is stored in the sqlite directory generated under PROF_XXX.
This option is mandatory in the cluster scenario.
-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
-h or --help
Help information.
Optional
Output Description
After the preceding command is executed and the parsing is complete, the sqlite directory is generated in device_{id} and host directories of PROF_XXX. The sqlite directory contains a .db file (an intermediate result, which can be ignored).
To export the timeline data or .db file of the final result, refer to Exporting Profile Data.