US 11,836,214 B2
Matrix calculation device and operation method thereof
Chiung-Liang Lin, Taichung (TW); and Chao-Yang Kao, Hsinchu (TW)
Assigned to NEUCHIPS CORPORATION, Hsinchu (TW)
Filed by NEUCHIPS CORPORATION, Hsinchu (TW)
Filed on Sep. 28, 2020, as Appl. No. 17/033,940.
Claims priority of application No. 109128071 (TW), filed on Aug. 18, 2020.
Prior Publication US 2022/0058238 A1, Feb. 24, 2022
Int. Cl. G06F 17/16 (2006.01); G06F 7/544 (2006.01)
CPC G06F 17/16 (2013.01) [G06F 7/5443 (2013.01)] 16 Claims
OG exemplary drawing
 
1. A matrix calculation device, configured to perform a matrix multiplication of a first matrix multiplying a second matrix, the matrix calculation device comprising:
a storing unit, adapted to store the first matrix and the second matrix;
a multiply accumulate circuit, configured to execute multiply accumulate calculation;
a pre-fetch circuit, coupled to the storing unit, wherein the pre-fetch circuit pre-fetches at least one column of the first matrix from the storing unit to act as pre-fetch data, the pre-fetch circuit pre-fetches at least one row of the second matrix from the storing unit to act as the pre-fetch data, or the pre-fetch circuit pre-fetches at least one column of the first matrix and at least one row of the second matrix from the storing unit to act as the pre-fetch data; and
a control circuit, coupled to the storing unit, the multiply accumulate circuit, and the pre-fetch circuit, wherein the control circuit determines whether contents of a current column of the first matrix are all 0 according to the pre-fetch data, so as to decide whether to skip the multiply accumulate calculation performed on the current column and the current row, or
the control circuit determines whether contents of a current row of the second matrix are all 0 according to the pre-fetch data, so as to decide whether to skip the multiply accumulate calculation performed on the current column and the current row.