GetArchVersion

Supported Products

Product

Supported/Unsupported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

Atlas inference product's Vector Core

x

Atlas training products

x

Function Usage

Obtains the version number of the current AI processor architecture.

Prototype

1
__aicore__ inline void GetArchVersion(uint32_t& coreVersion)

Parameters

Parameter

Input/Output

Description

coreVersion

Output

AI processor architecture version

Data type: uint32_t

Returns

None

Constraints

Before calling GetArchVersion, define coreVersion. After GetArchVersion is called, coreVersion changes to the corresponding architecture version.

Due to hardware restrictions, you need to print the converted AI processor architecture version number as a hexadecimal number or directly convert it into a hexadecimal number.

Example

The following example shows how to obtain the AI processor architecture version number by calling GetArchVersion.
1
2
3
    uint32_t coreVersion = 0;// Define the AI processor version.
    AscendC::GetArchVersion(coreVersion);
    AscendC::PRINTF("core version is %x", coreVersion);// Use %x to print it as a hexadecimal number.

Different server models have different architecture version numbers.

Architecture Version Number

Model

200

Atlas inference product's AI Core

220

Atlas A2 training products/Atlas A2 inference products

Atlas A3 training products/Atlas A3 inference products