--log
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Sets the level of logs to be printed during ATC model conversion.
See Also
None
Argument
- debug: debug, info, warning, and error logs
- info: info, warning, and error logs
- warning: warning and error logs
- error: Debug logs of the error level are generated.
- null (default): No debug log is generated.
Run logs support info, warning, error, and event logs by default. The levels cannot be adjusted. Security logs support debug, info, warning, and error logs by default. The levels cannot be adjusted.
Suggestions and Benefits
None
Example
--log=debug
If the model conversion fails, analyze logs to locate the fault. The log format is as follows. For details about logs, see Log Reference.
[Level] ModuleName(PID,PName):DateTimeMS [FileName:LineNumber]LogContent
The fields are described as follows:
Parameter |
Description |
|---|---|
Level |
Log level. Options: ERROR, WARNING, INFO, and DEBUG. |
ModuleName |
Name of the module that generates the log. |
PID |
Process ID. |
PName |
Process name. |
DateTimeMS |
Time when the log is printed, in the format of yyyy-mm-dd-hh:mm:ss.SSS.SSS. |
FileName:LineNumber |
File name and the corresponding line number that calls the log printing API. |
LogContent |
Log content of each module. |
Example:
[INFO] FE(30741,atc.bin):2021-12-09-16:10:22.539.141 [fe_type_utils.cc:52]30741 GetRealPath:"path /usr/local/Ascend/opp/built-in/op_impl/ai_core/tbe/config/ascendxxx is not exist." [WARNING] FE(30741,atc.bin):2021-12-09-16:10:22.539.146 [sub_op_info_store.cc:52]30741 Initialize:"The config file[/usr/local/Ascend/opp/built-in/op_impl/ai_core/tbe/config/ascendxxx] of op information library[tbe-builtin] is not existed. " [ERROR] GE(30741,atc.bin):2021-12-09-16:10:22.539.201 [error_manager.cc:263]30741 ReportErrMessage: [INIT][OPS_KER][Report][Error]error_code: W21000, arg path is not existed in map
Troubleshooting:
Parameter |
Description |
Solution |
|---|---|---|
GE |
GE graph build or verification error |
If a verification error is reported, the error cause will be provided. You need to modify the parameters used for model conversion to meet related requirements. |
FE |
Operator fusion error |
None |
TEFUSION |
|
Common errors and solutions: |
TBE |
Operator build error |
None |
Dependencies and Restrictions
- Log flushing:
During the execution of the atc command, logs are flushed to the following path by default:
- $HOME/ascend/log/debug/plog/plog-pid_*.log: debug log.
In the debug log scenario, since the default value of --log is null, no logs about the atc process are generated in the directory. However, other logs may be generated in the directory, for example, logs about Python dependencies. To generate logs about the atc process, set --log to a value other than null.
- $HOME/ascend/log/run/plog/plog-pid_*.log: run log.
- $HOME/ascend/log/security/plog/plog-pid_*.log: security log.
pid indicates the process ID, and * indicates the timestamp when the log file is created.
- $HOME/ascend/log/debug/plog/plog-pid_*.log: debug log.
- Log printing to the screen:
During the execution of the atc command, logs are not printed to the screen by default. To print logs to the screen, perform the following operations:
- Set the environment variable for determining whether to print logs on the screen in the atc command execution window:
export ASCEND_SLOG_PRINT_TO_STDOUT=1
- Set the --log option in the atc model conversion command. (This option cannot be set to null.)
- Set the environment variable for determining whether to print logs on the screen in the atc command execution window:
- Log redirection:
To redirect logs to files rather than flushing them to a specific directory, set the preceding environment variables for log printing before model conversion and set the --log option (to a value other than null) in the atc command.
atc xxx --log=debug >log.txt