aclsysGetVersionNum

Applicability

  

Supported

Atlas A3 Training Series Product

Atlas A2 Training Series Product/Atlas 800I A2 Inference Product

Atlas 200/500 A2 Inference Product

Atlas Inference Series Product

Atlas Training Series 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 main, 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

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.

The driver package name is driver.

The firmware package name is firmware.

versionNum

Output

Version number of the numeric type.

Returns

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