This invention discloses a pipelined, general-purpose multi-precision
matrix multiplication and addition circuit, belonging to the field of AI
chip design. This invention is designed for a highly parallel multi-precision
tensor computation unit based on a many-core architecture. It implements
matrix multiplication and addition operations with different data precisions based on a pipelined structure, including four data precisions: int4, int8, fp16, and fp32, as well as four
mixed precision operation
modes: int4 mixed with int32, int8 mixed with int32, fp16 mixed with fp32, and int8 mixed with fp32. The proposed circuit and method design independent pipelines for different operation
modes, allowing different types of data to reuse a single computation module, achieving a hardware resource
reuse rate of 88.9%. This invention is widely applicable to
tensor computation. By designing independent pipelines for different operation
modes and reusing
hardware circuits, it eliminates the need for separate circuits for integer and floating-
point data operations, thus improving hardware reuse.