This application discloses a
data processing apparatus and a
data processing method. The apparatus includes: a configuration module, an input routing module, an
interconnection routing module, and multiple multiply-accumulate unit modules; the configuration module configures the other modules according to an input
mathematical model; the input routing module establishes an input
route from the input
data channel to the input interface of the multiply-accumulate unit module according to the configuration; the
interconnection routing module establishes an
interconnection route from the output interface of the preceding multiply-accumulate unit module to the input interface of the following multiply-accumulate unit module according to the
numbering order of the multiply-accumulate unit modules, so as to realize the unidirectional cascading of multiple multiply-accumulate unit modules; the multiply-accumulate unit modules obtain their input data through the input
route and / or the interconnection route and perform arithmetic operations on their input data according to the configuration. This
data processing apparatus can realize flexible and complex arithmetic operations, meet the needs of switching and updating mathematical models, and balance data
processing efficiency,
data transmission efficiency, and interconnection overhead.