High Precision
Description
During the attention computation, the Q∙KT result may overflow the float16 data type. As a result, the NAN value is displayed in the output tensor of the operator. In this case, you can enable this function so that the operator uses the float32 data type to carry the intermediate result.
How to Enable
Set kernelType to KERNELTYPE_HIGH_PRECISION.
Restrictions
When this function is enabled, -inf in the input mask needs to be changed to 1.
The high-precision function takes effect only on the
Parent topic: High-precision/Approximate Computing