aclsysGetVersionNum

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Queries the version number based on a software package name. The version number is a numeric value. It is calculated using the weight of the major, minor, and patch versions in the version field of the version.info file in the package installation directory.

Numeric version numbers are obtained for comparison. A larger number indicates a later release. You can use the numbers to learn the release sequence of versions and distinguish the calling logic of different APIs based on the versions in code.

Currently, the released versions include alpha (internal test version), beta (public test version), release candidate (RC), and release. For the same base version, the version numbers increase in the following sequence: alpha < beta < RC < release. For example, 9.0.0-alpha.1 < 9.0.0-alpha.2 < 9.0.0-beta.1 < 9.0.0-beta.2 < 9.0.0-rc.1 < 9.0.0-rc.2 < 9.0.0 < 9.0.1.

Prototype

1
aclError aclsysGetVersionNum(char *pkgName, int32_t *versionNum)

Parameters

Parameter

Input/Output

Description

pkgName

Input

Software package name.

The CANN package name must be the same as the directory name in ${INSTALL_DIR}/share/info. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.

The driver package name is driver.

The firmware package name is firmware.

versionNum

Output

Version number of the numeric type.

Returns

0 on success; otherwise, failure. For details, see aclError.