aclrtFloatOverflowMode

1
2
3
4
5
typedef enum aclrtFloatOverflowMode {
    ACL_RT_OVERFLOW_MODE_SATURATION = 0, // Saturation overflow detection mode
    ACL_RT_OVERFLOW_MODE_INFNAN,         // Inf/NaN overflow detection mode
    ACL_RT_OVERFLOW_MODE_UNDEF,
} aclrtFloatOverflowMode;

In contrast to the Inf/NaN mode, the saturation mode converts the calculation result of Inf to a maximum value and the calculation result of NaN to 0. If the saturation mode is used, the calculation may be inaccurate. This mode is intended only for compatibility with earlier versions and will not evolve further.

For the Ascend 950PR/Ascend 950DT, Atlas A3 training products/Atlas A3 inference products, and Atlas A2 training products/Atlas A2 inference products, the Inf/NaN mode is used by default. The Ascend 950PR/Ascend 950DT support only the Inf/NaN mode.

For the Atlas 200I/500 A2 inference products, Atlas inference products, and Atlas training products, only the saturation mode is supported.