Before You Start

Restrictions

The data dump function collects operator input and output information. As this may include sensitive customer data, use this function only in development and debugging scenarios. You are advised to disable the data dump switch after production deployment to prevent exploitation by attackers and mitigate security risks.

  • Recommended environment configuration: CPU (8 cores, 2.6 GHz), memory (16 GB). Performance may be sluggish if hardware specifications are below these levels.
  • For all example paths in this document, ensure the execution user has the necessary read or read/write permissions.
  • Following the principle of least privilege, this tool should not be run using high-privilege accounts such as root. Execution under a standard user account is recommended.
  • This tool depends on the CANN software package. Before use, install CANN and run the source command on the set_env.sh environment variable file. To ensure security, do not modify the environment variables in set_env.sh after running the source command.
  • Ensure the execution user's umask value is set to 0027 or higher to prevent excessive permissions for generated accuracy data files and directories.
  • Users must strictly adhere to the principle of least privilege; for example, input files must not be writable by "others." In some function scenarios with stricter security requirements, ensure that the input files are not writable by group users.
  • This tool is a development and debugging tool. Do not to use it in the production environment.
  • Accuracy comparison of a single-operator network is not supported.
  • For details about the supported Python versions, see the CANN Software Installation Guide.
  • Supported dump data types:
    • FLOAT
    • FLOAT16
    • DT_INT8
    • DT_UINT8
    • DT_INT16
    • DT_UINT16
    • DT_INT32
    • DT_INT64
    • DT_UINT32
    • DT_UINT64
    • DT_BOOL
    • DT_DOUBLE
    • DT_BFLOAT16

      If the network contains the DT_BFLOAT16 data type, install the dependency through pip3 install bfloat16ext.

Environment Setup

Install the CANN Toolkit package and ops operator package of the required version, and configure CANN environment variables. For details, see For details, see CANN Software Installation Guide..

The CANN portfolio provides a process-level environment variable setting script to automatically set environment variables. The following commands are used as examples, in which the default installation paths are under the root or non-root user. Replace them with actual installation paths.

# If multiple Python 3 versions exist, specify your Python installation path. The following takes Python 3.7.5 as an example.
export PATH=/usr/local/python3.7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH