DeNormMin

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

Returns the minimum positive denormalized value of a specified data type.

For the Atlas 350 Accelerator Card, the supported data types are half, bfloat16_t, and float.

Prototype

  • Scalar API, which returns a scalar.
    constexpr __aicore__ static inline T DeNormMin()
  • Vector API, which assigns the minimum positive denormalized value to the first count elements of dstLocal.
    __aicore__ static inline void DeNormMin(const LocalTensor<T>& dstLocal, uint32_t count)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

dstLocal

Output

Destination operand.

Parameter of the LocalTensor type. TPosition can be VECIN, VECCALC, or VECOUT.

The start address of LocalTensor must be 32-byte aligned.

count

Input

Number of elements of the input data.

Returns

The scalar API returns the minimum positive denormalized value of the corresponding data type.

The vector API has no return value.

Restrictions

None

Example

  • Scalar API
    1
    float value = AscendC::NumericLimits<float>::DeNormMin();
    
  • Vector API
    1
    AscendC::NumericLimits<float>::DeNormMin(dstLocal, 256); // Return the minimum positive denormalized value for 256 elements of float.