A device and a method for performing neural network computation and matrix/vector computation, the device comprising a storage unit, a register unit, a control unit, a computation unit and a scratchpad memory. Neuron/matrix/vector data engaged in computation are temporarily stored in the scratchpad memory, such that data of different widths can be more flexibly and efficiently supported during computation, improving the execution performance of computation tasks. A customized neural network computation and matrix/vector computation module can accomplish various neural network computations and matrix/vector computations more efficiently, improving the execution performance of computation tasks; moreover, the instructions used are in the format of a very long instruction word.
DEVICE AND METHOD FOR PERFORMING NEURAL NETWORK COMPUTATION AND MATRIX/VECTOR COMPUTATION