Parsing Profile Data
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
This function only parses profile data and does not export profile data files. For details about how to export profile data files, see Profile Data Parsing and Export.
- If the profile data file fails to be parsed (for example, residual files exist because the first parsing fails due to certain reasons), you can run the msprof --parse command to parse the file again and then run the msprof --export command.
- If the --iteration-id and --model-id options need to be added to msprof --export, you can run the msprof --parse command to parse and print the iteration ID and model ID, and then specify the required iteration ID and model ID for export.
Precautions
- Complete the operations in Before You Start first.
- The profiling has completed.
- Direct parsing on the device is not supported for the products below. You must copy the generated PROF_XXX directory to an environment where the Toolkit package is installed.
Ascend RC scenario of theAtlas 200I/500 A2 inference product
Command Format
msprof --parse=on --output=<dir>
Command-line Options
Option |
Description |
Optional/Required |
|---|---|---|
--parse |
Parsing of the raw profile data file. The value can be on or off (default).
|
Required |
--output |
Directory for storing the raw profile data file. The value must be the PROF_XXX directory or the parent directory of the PROF_XXX directory, for example, /home/profiler_data/PROF_XXX. The path cannot contain the following characters: "\n", "\\n", "\f", "\\f", "\r", "\\r", "\b", "\\b", "\t", "\\t", "\v", "\\v", "\u007F", "\\u007F", "\"", "\\\"", "'", "\'", "\\", "\\\\", "%", "\\%", ">", "\\>", "<", "\\<", "|", "\\|", "&", "\\&", "$", "\\$", ";", "\\;", "`", "\\`". |
Required |
--python-path |
Path to the Python interpreter used for parsing. The Python version must be 3.7.5 or later. If the default Python version in the environment is earlier than 3.7.5, use this parameter to set the Python version to 3.7.5 or later. If this option is executed by a user with higher permissions, do not specify a path with low permissions. |
Optional |
Example
Parse raw profile data files by specifying /home/profiler_data/PROF_XXX as the raw profile data file directory.
msprof --parse=on --output=/home/profiler_data/PROF_XXX
Output Description
After the preceding command is executed, the profile data file information is displayed on the screen, and the sqlite directories are generated in device_{id} and host under PROF_XXX. In addition, a .db file is generated in each sqlite directory.
To export the timeline data or .db file of the final result, refer to Profile Data Parsing and Export.