Parsing Profile Data
For the following products, profile data cannot be directly parsed on devices. Instead, you need to copy the collected PROF_XXX directory to an environment where the Ascend-CANN-Toolkit is installed for data parsing.
Generally, the function of parsing profile data is not used separately. If the profile data file fails to be parsed (for example, if the initial parsing fails due to some reasons and residual files exist, an error occurs when the msprof --export command is executed again due to the lack of complete data). In this case, you need to use the msprof --parse function to parse the file again and run the msprof --export command again.
Prerequisites
- Ensure that operations in Before You Start have been completed.
- The profile data has been collected. (In CANN 6.3.RC2, CANN 6.2.RC2, and later versions, the structure of the collected raw profile data has been optimized; therefore, only the raw profile data collected by these versions can be parsed and exported.)
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 of 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.