Parsing Logs of a Custom AICPU Operator
Overview
This function parses dump data files to obtain required information.
Currently, this function can parse AICPU custom operator logs from dump data files and save the logs as log files.
Command Syntax
python3 dump_parser.py save_log -d <dump_file> [-out <output>]
Table 1 describes the command-line options.
This function is implemented through the dump_parser.py script, which is stored in ${INSTALL_DIR}/tools/operator_cmp/compare. 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..
Option |
Description |
Mandatory (Yes/No) |
|---|---|---|
-d --dump_file |
Dump data file to be parsed. |
Yes |
-out --output |
Directory for storing AICPU custom operator logs. The default directory is the current directory. The format of the result file name is dump_file_name.{index}.log. You are not advised to configure directories that are different from those of the current user to avoid privilege escalation risks. |
No |
Procedure
- Log in to the CANN tool installation environment.
- Go to the ${INSTALL_DIR}/tools/operator_cmp/compare directory. 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..
- Run the save_log parsing command.
python3 dump_parser.py save_log -d my_dump_path/dump_file -out /MyApp20/out
After the command is executed, the log file is generated in the directory specified by -out.