Before You Start

Restrictions

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

  • The recommended environment configuration for the accuracy tuning tool is a 2.6 GHz 8-core CPU with 16 GB of memory. Systems with lower specifications will experience slower execution.
  • 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 regular 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 that the execution user's umask is set to a value equal to or greater than 0027; otherwise, the tool may generate accuracy data files and directories with excessive permissions.
  • 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 CANN Software Installation.
  • 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 using 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..

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