Function: get_version_str

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Queries the version number based on a software package name. The version number is a character string. It is the same as the value of version in the version.info file in the package installation directory.

Prototype

  • C Prototype
    1
    aclError aclsysGetVersionStr(char *pkgName, char *versionStr)
    
  • Python Function
    1
    version_str, ret = acl.get_version_str(pkgName)
    

Parameters

Parameter

Description

pkgName

Str, 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.

Return Values

Return Value

Description

version_str

Str, version number of the string type.

ret

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