Preparations

Environment Setup

Supported product models: Atlas A2 training product/Atlas A2 inference product and Atlas A3 training product/Atlas A3 inference product.

The CANN software has been installed. For details, see CANN Software Installation.

In the AI server scenario, the installation node should isolate the container or virtual machine, whose lifetime should be consistent with the lifetime of the service process or tenant. When the lifetime of the container or virtual machine ends, persistent data must be cleared to prevent impact on the next service process or tenant.

  • Required environment variables:
    After the CANN software is installed, log in to the environment as the CANN operating user and run the source ${INSTALL_DIR}/set_env.sh command to set environment variables. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
    export RESOURCE_CONFIG_PATH=numa_config.json // Specify the path for storing the heterogeneous resource description file.

    For details about numa_config.json, see numa_config.json Configuration.

  • Optional environment variables
    export ASCEND_GLOBAL_LOG_LEVEL=0 // Set the log level for application logs and for each module. Only debug logs are supported. Value 0 indicates the DEBUG level.
    export ASCEND_SLOG_PRINT_TO_STDOUT=1 // Specify whether to enable log printing. Value 1 indicates that log printing is enabled.

    For details, see Environment Variables.

The preceding environment variables take effect only in the current window. You can write the preceding commands to the ~/.bashrc file to make them take effect permanently. The method is as follows:

  1. Run the vi ~/.bashrc command in any directory as the installation user and append the preceding command to the file.
  2. Run the :wq! command to save the file and exit.
  3. Run the source ~/.bashrc command to make the environment variable take effect.

Network Analysis

To construct a graph using FlowData and FlowNode, you need to specify the following information based on the network:
  1. The network contains several inputs, which are represented using FlowData.
  2. The network contains several compute nodes, which are represented using FlowNode.
  3. The actual computation in FlowNode is conducted by ProcessPoint. There are two types of ProcessPoints: GraphPp and FunctionPp. If GraphPp is used, see Graph Development to perform AscendGraph development. If FunctionPp is used, see "User Defined FlowFunction" in UDF Development.