aclsysGetVersionNum

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

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.

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.