Upgrading CANN

If the CANN software is installed online using Yum, specify the target version number in the Yum command. The following is an example:
1
sudo yum install -y Ascend-cann-toolkit-9.0.0-linux
If the CANN software is installed online using apt-get, specify the target version number in the Yum command. The following is an example:
1
sudo apt-get install -y ascend-cann-toolkit=9.0.0

If the CANN software is installed online using Conda, click here to check and install the software by running the corresponding command.

For CANN software installed using a runfile, perform the following steps to upgrade the software.

CANN Software Compatibility

CANN software allows independent upgrades for the Toolkit and ops packages. The current major version (N) features a sliding-window compatibility covering adjacent years, defined as [N – 1, N, N + 1]. CANN 8.5.0 is the minimum supported version. For instance, the Toolkit of version 9.0.0 is compatible with the ops of version 8.5.0.

Prerequisites

Before upgrading Toolkit, ensure that the available space of the installation directory to be used is greater than the space occupied by the installed software package plus 10 GB. If the space is insufficient, clear the space.

You can run the df -h <Installation directory> command to query the available space of the installation directory, and run the du -sh <Installation directory> command to query the space occupied by the software packages.
1
2
df -h ${HOME}/Ascend/cann
du -sh ${HOME}/Ascend/cann

Upgrade Procedure

Ensure the upgrade follows the Toolkit > ops sequence. Because upgrading the Toolkit automatically uninstalls the companion ops package, you must reinstall the ops package after the Toolkit upgrade.

  1. Log in to the installation environment as the installation user and go to the directory where the software package is stored.
  2. Add the execute permission on the software package (replace xxx.run with the actual full name of the software package):
    1
    chmod +x xxx.run
    
  3. Upgrade the software.
    1
    ./xxx.run --upgrade
    
    After the upgrade is complete, if the following information is displayed, the software is upgraded successfully:
    1
    xxx upgrade success
    

    xxx indicates the name of the software package that is successfully upgraded.