--log

Applicable Products

All processors

Description

Sets the level of logs to be printed during ATC-based model conversion.

See Also

None

Arguments

Debug logs support the following levels:
  • debug: Outputs debug, info, warning, and error logs.
  • info: Outputs info, warning, and error logs.
  • warning: Outputs warning and error logs.
  • error: Outputs error logs.
  • 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:

Table 1 Log field description

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:

Table 2 Fault location

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

  • Operator prebuild/build error
  • Fusion operator build error

Common errors and solutions:

  1. ModuleNotFoundError: No module named 'decorator'

    Solution: Install the pip package as prompted.

  2. ModuleNotFoundError: No module named 'te'

    Solution: The command for installing the ATC package does not include --pylocal. You are advised to use this parameter to reinstall the package.

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.

  • 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 steps:

    • Set the environment variable for determining whether to print logs to 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.)

    For more information about logs, see Log Reference.

  • 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

    Replace xxx with the actual option.