Function: get_version

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

Returns the version number. The pyacl version ID can be formatted as A.B.C, where A indicates incompatible changes, B indicates new APIs, and C indicates the patch version.

Prototype

  • C Prototype
    1
    aclError aclrtGetVersion(int32_t *majorVersion, int32_t *minorVersion, int32_t *patchVersion)
    
  • Python Function
    1
    major_version, minor_version, patch_version, ret = acl.get_version()
    

Parameters

None

Return Values

Return Value

Description

major_version

Int, major version. The value starts from 1 and is incremented by 1 with each incompatible API change.

minor_version

Int, minor version. The value starts from 0 and is incremented by 1 with each newly added API.

patch_version

Int, Patch version. The value starts from 0, indicating that this version has only fixed bugs. The value is incremented by 1 if the majorVersion and minorVersion remain unchanged. When the majorVersion and minorVersion increase, patchVersion remains at 0.

ret

Int, error code. 0 on success; else, failure.