Function: set_dump

Applicable Products

Product

Supported (√/x)

Ascend 950PR / Ascend 950DT

√

Atlas A3 training products / Atlas A3 inference products

√

Atlas A2 training products / Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Sets dump configuration.

Prototype

Parameters

Parameter

Description

dump_cfg_path

  • Str, path of the configuration file, including the file name.

Currently, the following dump information can be configured: (If the operator input or output contains sensitive user information, information leakage may occur.)

  • Model dump configuration (used to export the input and output data of operators at each layer in the model) and single-operator dump configuration (used to export the input and output data of an operator). The exported data is used to compare with that of a specified model or operator to locate accuracy issues. For details about the configuration example, description, and restrictions, see Examples of Model Dump Configuration and Single-Operator Dump Configuration. This dump configuration is disabled by default.
  • Dump configuration of the exception operator (used to export the input and output data, workspace information, and tiling information of the exception operator). The exported data is used to analyze AI Core errors. For details about the configuration example, see Example of Dump Configuration for Exception Operators. This dump configuration is disabled by default.
  • Dump configuration of the overflow/underflow operator (used to export the input and output data of the overflow/underflow operator in the model). The exported data is used to analyze overflow/underflow causes and locate model accuracy problems. For details about the configuration example, description, and restrictions, see Example of Overflow/Underflow Operator Dump Configuration. This dump configuration is disabled by default.
  • Operator Dump Watch mode configuration (enables the observation mode for the output data of a specified operator). If you suspect that the memory is overwritten by other operators after locating the accuracy issues of some operators and excluding the computation issues of the operators, you can enable the Dump Watch mode. For details about the configuration example and restrictions, see Dump Watch Configuration for Operators. The dump watch mode is disabled by default.
  • This dump configuration is used to export the debugging information of the Ascend C operator kernel to locate operator problems. This dump configuration is disabled by default.

    This configuration is only available for the following models:

    Ascend 950PR / Ascend 950DT

    Atlas A3 training products / Atlas A3 inference products

    Atlas A2 training products / Atlas A2 inference products

    Atlas 200I/500 A2 inference products

    Atlas inference products

Return Values

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Restrictions

Reference

In addition, the acl.init API is provided. During initialization, the dump configuration is transferred through the *.json file. After the application is run, the dump data is obtained. In this mode, the acl.init API can be called only once in a process. To modify the dump configuration, modify the configuration in the *.json file.

Dump Watch Configuration for Operators

Set dump_scene to watcher to enable the operator dump watch mode. The following is an example of the configuration file: (1) After operators A and B are executed, the output of operators C and D is dumped. (2) After the C and D operators are executed, the output of the C and D operators is also dumped. Compare the dump files of operators C and D in (1) and (2) to check whether operators A and B overwrite the output memory of operators C and D.

{
    "dump":{
        "dump_list":[
            {
                "layer":["A", "B"],
                "watcher_nodes":["C", "D"]
            }
        ],
        "dump_path":"/home/",
        "dump_mode":"output",
        "dump_scene":"watcher"
    }
}

The details are as follows:

Dump configuration of the operator kernel debugging information

Configure the dump_kernel_data parameter to enable the operator kernel debugging information dump function. The following is an example of the configuration file:

{
    "dump":{
        "dump_kernel_data":"printf,assert",
        "dump_path":"/home/"
    }
}

The details are as follows: