GetSpr

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Obtains the value of a specified special-purpose register. This API is reserved.

Prototype

template <SpecialPurposeReg spr>
__aicore__ inline int64_t GetSpr()

Parameters

Table 1 Template parameters

Parameter

Description

spr

Special-purpose register of the SpecialPurposeReg enum class. For details about the values, see Table 2. Currently, no value of the SpecialPurposeReg enum class is supported.

Table 2 SpecialPurposeReg template parameters

Value

Meaning

AR

A special address register, which is usually used together with the Squeeze Reg vector computation API. The Squeeze Reg vector computation API stores the total number of bytes of valid elements to the AR.

Returns

Value of the special register of the int64_t type.

Constraints

None

Example

Reserved API. No example is provided.