Upgrading CANN

After installing the CANN software in xxx.run format, you can upgrade it in the following steps.

Prerequisites

  • Before upgrading Toolkit, ensure that the available space of the installation directory is greater than or equal to the space occupied by the software package to be upgraded plus 7 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/ascend-toolkit
    du -sh ${HOME}/Ascend/ascend-toolkit
    
  • In 8.0.RC3 and later versions, the NNAL acceleration library software package can be upgraded using the --upgrade parameter.

Upgrade Procedure

After Kernels is installed with other CANN packages (Toolkit, NNAE, or NNRT), Kernels is automatically uninstalled when other CANN packages are upgraded. You need to use the --install parameter to reinstall the Kernels package as required.

  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 and verify the consistency and integrity of the software package (replace xxx.run with the actual full name of the software package).
    1
    2
    chmod +x xxx.run
    ./xxx.run --check
    
  3. Upgrade the software.
    1
    ./xxx.run --upgrade
    

    After the preceding command is executed, enter Y or y to agree to the Huawei Enterprise End User License Agreement (EULA) to continue the 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.