The invention discloses a
hybrid precision arithmetic unit for FP16
floating point data and INT8 integer data operation. The
mixed precision arithmetic unit comprises a precision conversion module, an arithmetic unit, two input data and one, two or four output data. The input data and the output data are expressed in an EM16 format, and the EM16 format expression is 16 digits and comprises FP16
floating point expression, INT8 integer expression and INT8 double integer expression; the two input data are respectively
feature data and parameter data in neural network calculation; the precision conversion module is used for executing precision conversion among expressions of the EM16 format of the
feature data according to the external configuration information; and the arithmetic unit is used for executing additive operation or multiplication operation between two pieces of data which are both FP16
floating point data or both INT8 integer data according to external configuration information. According to the
hybrid precision arithmetic unit, FP16 floating
point data and INT8 integer data can be used in a
mixed mode in the calculation process, so that
hybrid precision calculation can have the precision of the FP16 and the speed of the INT8 in a neural network calculation task.