Overflow/Underflow Operator Data Collection and Analysis

Prerequisite

To use the ATC tool to convert a model, ensure that the --status_check parameter has been added to the conversion command and set to 1, indicating that the overflow/underflow detection logic is added during operator compilation.

For details about the ATC tool and its parameters, see ATC Instructions.

Collecting Overflow/Underflow Operator Information

When the aclInit API is called for initialization, the dump configuration of an overflow/underflow operator is added to the JSON configuration file.

The following is an example of the content in the JSON configuration file. In the example, dump_path is a relative path.
{
    "dump":{
        "dump_path":"output",
        "dump_debug":"on"
    }
}

If dump_path is set to a relative path, you can view the exported data files in {dump_path} under the directory of app executable files. For each overflow/underflow operator, two data files are exported:

  • Dump file of an overflow/underflow operator (the file name starts with {op_type}). You can parse this file to identify the overflow/underflow operator.
  • Data file of an overflow/underflow operator (the file name starts with Opdebug). You can parse this file to obtain the overflow information, including the model where an overflow/underflow operator is located and the AI Core status register.

For details about how to parse the preceding two files, see "Overflow/Underflow Operator Data Collection and Analysis" in Accuracy Debugging Tool Guide.