GetArchVersion
Supported Products
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
x |
|
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
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 |
|
220 |