Patent ID: 11860970
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method for performing a matrix multiplication operation, comprising:
obtaining, by a system on chip (SOC), a conditional sparsity matrix A1 having m rows and k columns, wherein elements in each of the m rows of the matrix A1 are grouped into at least one group, a quantity of elements in each group is k1, a quantity of non-zero elements in each group of elements is less than or equal to k2, k is greater than or equal to k1 and k is divisible by k1, and k1 is greater than or equal to k2 and k1 is divisible by k2, and m, k, k1, k2 are positive integers;
performing, by the SOC, a matrix multiplication operation, comprising:
obtaining a matrix B1 having k rows and n columns, a matrix A2 having m rows and t columns, and an index matrix having m rows and t columns, wherein the matrix A2 includes a plurality of elements that were selected from the matrix A1, wherein the index matrix comprises a plurality of indexes indicating locations within the matrix A1 from which the plurality of elements of the matrix A2 were selected, wherein n and t are all positive integers, and t is less than or equal to k;
selecting elements corresponding to the indexes of the index matrix from the matrix B1; and
performing the matrix multiplication operation based on the matrix A2 and the selected elements from the matrix B1.