Preparations
Environment Setup
Supported product models:
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.
- 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.
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:
- Run the vi ~/.bashrc command in any directory as the installation user and append the preceding command to the file.
- Run the :wq! command to save the file and exit.
- Run the source ~/.bashrc command to make the environment variable take effect.
Network Analysis
- The network contains several inputs, which are represented using FlowData.
- The network contains several compute nodes, which are represented using FlowNode.
- 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.