Parsing Profile Data
For the following products, profile data cannot be directly parsed on devices. Instead, you need to copy the generated PROF_XXX directory to an environment where the CANN Toolkit package and ops operator package are installed for data parsing.
- Ascend RC scenario of the Atlas 200/500 A2 Inference Product
- This function only parses profile data and does not export profile data files. For details about how to export profile data files, see Parsing and Exporting Profile Data.
- Generally, the profile data parsing function does not need to be used independently. It is used in the following scenarios:
- 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.
Prerequisites
- Ensure that operations in Before You Start have been completed.
- The profile data has been collected.
Procedure
Run the parsing command. An example command is as follows:
msprof --parse=on --output=<dir>
Option |
Description |
Required/Optional |
|---|---|---|
--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 parent directory of the PROF_XXX or PROF_XXX directory, for example, /home/HwHiAiUser/profiler_data/PROF_XXX. The following special characters are not allowed in the path: "\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. |
Optional |
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.