The invention discloses
mixed precision multiply-add operation hardware, which comprises an input
processing unit used for obtaining standard symbols, standard indexes and standard mantissas according to a pre-configured
input format and unpacked input multiply-add operation factors, and obtaining input and output special value detection results; the
floating point multiplier-
adder is used for calculating an operation result after the
operand multiplies the scaling factor and the offset is accumulated according to the symbol, the exponent and the mantissa of each multiplication-addition operation factor; and the output
processing unit is used for obtaining a target format result according to a pre-configured output format, a
rounding type and a normalization and
rounding operation result, packaging the target format result according to a detection result and outputting the target format result, and by
multiplexing a
data path of the floating-point multiplier-
adder, the
chip area is saved, format conversion is integrated, a
data stream is simplified, and the
data processing efficiency is improved. The requirements for automatic reconstruction of the multiply-add operation unit according to input and output formats and quantization and
inverse quantization of floating points and integers are met, and the
reuse rate of computing resources is increased.