Installing CANN

To upgrade an earlier version to CANN 8.5.0, you must use parameters to upgrade or uninstall all earlier versions and then install CANN 8.5.0. Otherwise, the installation may fail.

Prerequisites

Before the installation, ensure that the Python environment and pip3 are available. Currently, CANN supports Python 3.7.x to 3.13.x. If the Python version does not meet the requirements, run the following commands to install it:

Debian/Ubuntu/veLinux:
1
sudo apt-get install -y python3 python3-pip
openEuler, CentOS, Kylin, BCLinux, UOS V20, AntOS, AliOS, CTyunOS, CULinux, Tlinux, MTOS, vesselOS:
1
sudo yum install -y python3 python3-pip

If the installation fails, the version does not meet the requirements, or the dynamic library libpython3.x.so is not included, perform the operations in Compiling and Installing Python.

Installing the Toolkit Development Kit

The CANN Toolkit development kit is installed in the training, inference, and development and debugging scenarios. It is used for training and inference services, model conversion, and operator/application/model development and compilation.

  • Ensure that the available space of the installation directory is greater than 10 GB. If this requirement is not met, clear the space or change the installation directory.
  • Both Toolkit and ops need to be installed.

Architecture

Installation Command

aarch

1
bash ./Ascend-cann-toolkit_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-toolkit_8.5.0_linux-x86_64.run --install

The installation command supports parameters such as --install-path=<path>. For details, see Parameter Description. If you do not specify an installation path, the software is installed in the default path. The default installation paths are as follows: For the root user, the default path is /usr/local/Ascend. For a non-root user, the default path is ${HOME}/Ascend, where ${HOME} indicates the current user directory.

After the installation is complete, configure environment variables. The following uses the default path after installation as a non-root user as an example. Run the following command based on the actual path of set_env.sh:
1
source ${HOME}/Ascend/cann/set_env.sh

The preceding environment variables take effect only in the current window. You can add the preceding commands to the environment variable configuration file (for example, the .bashrc file) as required.

Installing the ops Operator Package

The CANN operator package optimizes high-performance computing by integrating a comprehensive suite of libraries, including the basic operator framework, specialized libraries for Math, NN, CV, and Transformer, as well as the TBE operator, HCCL set communication library, HIXL unilateral communication library, and DVPP library. This package provides both dynamic and static library files for single-operator API execution (such as aclnn), alongside the source operator source code and kernel binary files. By bundling these diverse assets, CANN significantly enhances overall running capability and execution efficiency in intensive computing scenarios.

Before installing the ops operator package, install Toolkit of the matching version in the same path. Currently, the ops operator packages of multiple chips cannot be installed in the same path. You can install Toolkit and ops of different chips in different paths to meet the development and deployment requirements in a multi-chip environment.

The installation command supports parameters such as --install-path=<path>. For details, see Parameter Description.

Table 1 Installation of the ops operator package

Product Type

Architecture

Installation Command

Atlas A3 series

aarch

1
bash ./Ascend-cann-A3-ops_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-A3-ops_8.5.0_linux-x86_64.run --install

Atlas A2 series

aarch

1
bash ./Ascend-cann-910b-ops_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-910b-ops_8.5.0_linux-x86_64.run --install

Atlas training series

aarch

1
bash ./Ascend-cann-910-ops_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-910-ops_8.5.0_linux-x86_64.run --install

Atlas inference series

aarch

1
bash ./Ascend-cann-310p-ops_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-310p-ops_8.5.0_linux-x86_64.run --install

Atlas 200I/500 A2 inference series

aarch

1
bash ./Ascend-cann-310b-ops_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-310b-ops_8.5.0_linux-x86_64.run --install

(Optional) Installing the NNAL Neural Network Acceleration Library

The NNAL neural network acceleration library provides the Ascend Transformer Boost (ATB) and AscendSiPBoost (SiP) signal processing acceleration libraries.

Before installing an acceleration library, install Toolkit of the matching version and configure environment variables.

Architecture

Installation Command

aarch

1
bash ./Ascend-cann-nnal_8.5.0_linux-aarch64.run --install

x86_64

1
bash ./Ascend-cann-nnal_8.5.0_linux-x86_64.run --install

The installation command supports parameters such as --install-path=<path>. For details, see Parameter Description. If you do not specify an installation path, the software is installed in the default path. The default installation paths are as follows: For the root user, the default path is /usr/local/Ascend. For a non-root user, the default path is ${HOME}/Ascend, where ${HOME} indicates the current user directory.

Configure environment variables. The following uses the default path after installation as a non-root user as an example. Replace the path with the actual path of set_env.sh of the acceleration library.
  • ATB acceleration library:
    1
    source ${HOME}/Ascend/nnal/atb/set_env.sh
    
  • SiP acceleration library:
    1
    source ${HOME}/Ascend/nnal/asdsip/set_env.sh
    

The preceding environment variables take effect only in the current window. You can add the preceding commands to the environment variable configuration file (for example, the .bashrc file) as required.