Function: get_version_str

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

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

    aclError aclsysGetVersionStr(char *pkgName, char *versionStr)
    
  • Python Function

    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. ${INSTALL_DIR} must be replaced with the actual CANN installation path. 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. If 0 is returned, the operation is successful. If other values are returned, the operation fails.