Parameter Description

This section describes the parameters related to the software package in .run format. The software package in .run format supports one-click installation using command line parameters. The commands can be used together. You can select parameters as required. All parameters are optional.

Installation command syntax: ./xxx.run [options]

For details, see Table 1.

  • If an option queried by running the ./xxx.run --help command is not in the following table, the option is reserved or applies to other product types.
  • The following options are not displayed in --help. Do not use them directly.
    • --xwin: uses the xwin operating mode.
    • --phase2: performs the second step.
Table 1 Parameters supported by the .run package

Parameter

Description

--help | -h

Queries help information.

--info

Queries software package construction information.

--list

Queries the software package list.

--check

Checks the consistency and integrity of software packages.

--quiet | -q

Indicates silent upgrade or installation, which skips interactive messages. This option must be used together with the --install or --upgrade option.

When this parameter is used for installation or upgrade, Huawei Enterprise End User License Agreement (EULA) is signed by default.

--nox11

Does not use the x11 operating mode.

--noexec

Skips the execution of the installation script. It is used together with --extract=<path> in the format of --noexec --extract=<path>.

--extract=<path>

Decompresses a software package to a specified directory. When this parameter is used, a directory is automatically created during the extraction. For example, after the --noexec --extract=./package command is executed, the decompressed files are automatically stored in the package directory.

--tar arg1 [arg2 ...]

Runs the tar command on the runfile. Use the options following tar as the command-line options. For example, the --tar xvf command indicates that the RUN package will be decompressed to the current directory.

--install

Installs a software package. You can specify the installation path --install-path=<path> or use the default installation path.

NOTE:

For the kernels package, using the --install parameter will install all files except the static library.

--devel

Only the Toolkit, nnrt, and kernels software packages support this parameter.

Installs a software package in development mode, that is, install only the files required by the development environment.

NOTE:

For the kernels package, if the --devel parameter is used, all files, dynamic and static library files for single-operator API execution (such as aclnn APIs), and kernel binary files are installed.

--full

Only the Toolkit software package supports this parameter.

Full installation is supported when no driver is installed.

--install-path=<path>

Specifies the operation path. It must be used together with --install, --upgrade, and --uninstall.

If the global configuration file ascend_cann_install.info exists in the environment, the path specified by this parameter must be the same as the installation path in the global configuration file. If you want to change the installation path, delete the file or change the installation path in the file to a specified path. In addition, you are advised to uninstall the CANN package in the original path.

Check whether the global configuration file ascend_cann_install.info exists in the following directory:

  • root user: /etc/Ascend
  • Non-root user: ${HOME}/Ascend

If you do not specify the path, the default path is used.

  • For installation as the root user, the default installation path is /usr/local/Ascend.
  • For installation as a non-root user, the default installation path is ${HOME}/Ascend.

If an installation directory is specified by this parameter, the root user must have the 755 permission on this directory, and a non-root user must have the 750 permission on this directory.

--install-for-all

Allows all users to have the same installation group permission.

If this parameter is included in installation or upgrade command, all users have the same permissions on the created directories and files as the installation group, which may cause security risks. Exercise caution when using it.

This parameter must be used together with --install, --devel or --upgrade. For example:

1
./xxx.run --install --install-for-all

--force

Specifies the forcible installation and upgrade command. If the installation or upgrade fails due to the installation or upgrade check failure, the system prompts you to use this parameter to skip the check to make the installation or upgrade succeed.

This parameter must be used together with --install, --upgrade, --devel, or --full.

--feature

Only the Toolkit, nnrt, nnae, and kernels software packages support this parameter.

This parameter can be used to specify certain features during Toolkit, nnrt, and nnae installation/upgrade, and kernels installation.

  • Currently, the value of Toolkit, nnrt, or nnae software package can only be ascendc, indicating that only common mandatory files and files marked with the Ascend C operator development feature are installed. Files not marked with the Ascend C operator development feature are skipped and not installed. Note that the ascendc feature includes only kernel development (which involves calling operators in basic mode based on the kernel launch operator project) and does not include ACLNN development (which involves developing single-operator applications in single-operator API execution mode).

    This option must be used together with --install, --devel, --full, and --upgrade. For example:

    1
    ./xxx.run --install --feature=ascendc
    
  • The values of the kernels software package are as follows. You can enter one or more features at the same time.
    • aclnn_ops_infer: NN operator inference library Due to the dependency of the inference library on the math library, files marked with the aclnn_ops_infer feature and files marked with the aclnn_math feature are installed
    • aclnn_ops_train: NN operator training library Due to the dependency of the training library on the inference library, random number operator library, and math library, files marked with the aclnn_ops_train, aclnn_ops_infer, aclnn_rand, and aclnn_math are installed.
    • aclnn_math: mathematical operator library
    • aclnn_rand: random number operator library
    Example:
    1
    ./Ascend-cann-kernels-<chip_type>_<version>_linux-<arch>.run --install --feature=aclnn_ops_infer
    
    NOTE:
    • For details about the operator APIs corresponding to the preceding libraries, see "NN Operator API List" in Operator Acceleration Library API Reference.
    • If features are selected for installation for multiple times, the new features are incrementally installed and do not overwrite the installed features.

--whitelist=<feature_type>

Only the Toolkit and nnae software packages support this parameter.

Specifies the optional installation trustlist, which is used to specify certain optional features during installation or upgrade. This parameter must be used in conjunction with --install or --upgrade based on the parameter function.

  • nnae: Only features related to the nnae package are installed to support offline inference, online inference, training, and IR graph construction. It can be used only by the Toolkit package.
  • nnrt: Only features related to the nnrt package are installed to support offline inference. It can be used only by the Toolkit package.
  • hccl: Only the hccl basic dependency package and nnrt package are installed. It is mainly used by Toolkit and nnae packages in multi-server multi-device inference scenarios.
  • hccl-only: Only the HCCL basic dependency package is installed. The Toolkit and NNAE packages can be used for upgrade.
  • atc: Only the ATC conversion tool feature is installed to support model compilation and conversion. It can be used only by the Toolkit package.
  • devtools: Only the development tool package is installed to provide the commissioning and simulation tools. If this feature is selected, nnae must be installed. It can be used only by the Toolkit package.

--chip=<chip_type>

Only the Toolkit , nnrt, and nnae software packages support this parameter. If this parameter is not specified, all AI CPU OPPs in the software package are installed by default.

Specifies the Ascend product type so that the matching software (such as the AI CPU operator package) can be selected during the installation.

--upgrade

Upgrades the installed software from an earlier version to a later version.

If you need to roll back from a later version to an earlier version, uninstall the later version and install the required version.

--feature-list=<feature>

Only the Toolkit and nnae software packages support this parameter.

Specifies the upgrade feature. This parameter is used only for upgrade. The value can only be Acclibs (independent upgrade of the OPP), for example, --feature-list=Acclibs.

This parameter must be used together with --upgrade.

NOTE:

A full upgrade is recommended. If the version mapping table contains the compatibility list for independent OPP upgrade, refer to the compatibility list. Otherwise, you are advised to perform a full upgrade.

--uninstall

Uninstalls the software that has been installed.

--type=<package_type>

Only the kernels software package supports this parameter.

Specifies the type of the installed CANN package. This parameter is used to specify the software package (nnae, nnrt, or toolkit) to be installed during the installation (--install) to identify the specific installation directory. This parameter must be used together with --install or --uninstall.

--version

Queries version information.