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-8.5.0-linux

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

If the CANN software is installed using a .run package (offline), perform the following steps to upgrade the CANN software:

Prerequisites

Before upgrading Toolkit, ensure that the available space of the installation directory is greater than the space occupied by the software package to be upgraded plus 10 GB. If not, 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 package.
1
2
df -h ${HOME}/Ascend/cann
du -sh ${HOME}/Ascend/cann

Upgrade Procedure

  • When rolling back CANN 8.5.0 to an earlier version, you cannot use the --upgrade parameter. You need to uninstall CANN 8.5.0 and then install the target version.
  • In CANN 8.5.0, the ops operator package is released for the first time. This version supports only the ops installation using the --install parameter. The --upgrade parameter cannot be used to upgrade the ops.
  • If ops is installed together with Toolkit, ops will be automatically uninstalled when Toolkit is upgraded. In this case, reinstall the ops software package.
  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 Toolkit 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 information similar to the following is displayed, the upgrade is successful:
    1
    xxx upgrade success
    

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

  4. When deploying the environment, install both the Toolkit and ops. After the Toolkit package is upgraded, install the ops operator package by referring to Installing CANN.