SetStoreAtomicConfig(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

Sets the atomic operation enabling flag and type.

Prototype

1
2
template <AtomicDtype type, AtomicOp op>
__aicore__ inline void SetStoreAtomicConfig()

Parameters

Table 1 Parameters in the template

Parameter

Input/Output

Description

type

Input

Atomic operation enable bit. The definition of the AtomicDtype enumeration class is as follows:

1
2
3
4
5
6
7
8
9
enum class AtomicDtype {
    ATOMIC_NONE = 0,  // No atomic operation.
    ATOMIC_F32,       // Enable the atomic operation of the float data type.
    ATOMIC_F16,       // Enable the atomic operation of the half data type.
    ATOMIC_S16,       // Enable the atomic operation of the int16_t data type.
    ATOMIC_S32,       // Enable the atomic operation of the int32_t data type.
    ATOMIC_S8,        // Enable the atomic operation of the int8_t data type.
    ATOMIC_BF16 ,        // Enable the atomic operation of the bfloat16_t data type.
};

op

Input

Atomic operation type. This parameter is valid only when type is not ATOMIC_NONE. Currently, only the sum operation is supported.

1
2
3
enum class AtomicOp {
    ATOMIC_SUM = 0   // Sum operation
};

Returns

None

Constraints

None

Examples

1
2
// Set the atomic operation to the sum operation. The supported data type is half.
AscendC::SetStoreAtomicConfig<AscendC::AtomicDtype::ATOMIC_F16, AscendC::AtomicOp::ATOMIC_SUM>();