GetStoreAtomicConfig(ISASI)

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

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function Usage

Obtains the value of the enabling flag and type of the atomic operation. For details, see Table 1.

Prototype

1
__aicore__ inline void GetStoreAtomicConfig(uint16_t& atomicType, uint16_t& atomicOp)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

atomicType

Output

Atomic operation enabling flag.

0: no atomic operation.

1: enables the atomic operation, of the float data type.

2: enables the atomic operation, of the half data type.

3: enables the atomic operation, of the int16_t data type.

4: enables the atomic operation, of the int32_t data type.

5: enables the atomic operation, of the int8_t data type.

6: enables the atomic operation, of the bfloat16_t data type.

atomicOp

Output

Atomic operation type.

0: sum operation.

Returns

None

Constraints

This API must be used together with SetStoreAtomicConfig(ISASI) to obtain the value of the enabling flag and type of the atomic operation.

Example

1
2
3
4
AscendC::SetStoreAtomicConfig<AscendC::AtomicDtype::ATOMIC_F16, AscendC::AtomicOp::ATOMIC_SUM>();
uint16_t type = 0;        // Atomic operation enabling flag
uint16_t op = 0;         // Atomic operation type
AscendC::GetStoreAtomicConfig(type, op);