# US 2023/0068450 A1 · Method and apparatus for processing sparse data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0068450 A1
- Document ID: US20230068450A1
- Status: Published application
- Kind: A1
- Application number: 17/904,360
- Filed: 2021-05-27
- Published: 2023-03-02
- Earliest claimed: 2020-12-24
- Assignees: Beijing Tsingmicro Intelligent Technology Co., Ltd.
- Applicants: Beijing Tsingmicro Intelligent Technology Co., Ltd.
- Inventors: Shibin TANG; Peng OUYANG
- Web page: https://patentgrep.com/patent/US20230068450A1

## CPC

- G06F 17/15: Correlation function computation {including computation of convolution operations (arithmetic circuits for sum of products per se, e.g. multiply-accumulators G06F7/5443; digital filters, e.g. FIR, IIR, adaptive filters H03H17/00)}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 17/153: {Multidimensional correlation or convolution}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The disclosure provides a method and apparatus for processing sparse data. The method is applied to a reconfigurable processor that includes a PE array, and the PE array includes P×Q PE units. The method includes: dividing a sparse weight matrix to be calculated into at least one unit block; grouping a plurality of unit blocks into a computing group; and obtaining an effective weight address corresponding to each effective weight in the computing group.

## Claims

### Claim 1

A method for processing sparse data, performed by a reconfigurable processor, wherein the reconfigurable processor comprises a processing element (PE) array, and the PE array comprises P×Q PE units, the method comprising:
dividing a sparse weight matrix to be calculated into at least one unit block;
grouping a plurality of unit blocks into a computing group; and
obtaining an effective weight address corresponding to each effective weight in the computing group.

### Claim 2 (depends on 1)

The method of claim 1, wherein dividing the sparse weight matrix to be calculated into at least one unit block comprises:
dividing the sparse weight matrix into the at least one unit block by taking P×Q unit blocks as a division unit in a row direction and a column direction of the sparse weight matrix, wherein each unit block comprises at least one effective weight.

### Claim 3 (depends on 1)

The method of claim 1, wherein grouping the plurality of unit blocks into the computing group comprises:
grouping the plurality of unit blocks in the sparse weight matrix into a computing group in a column direction of the sparse weight matrix;
determining whether a total number of effective weights in the computing group is more than (P×Q)/2;
in response to the total number of effective weights in the computing group being more than (P×Q)/2, splitting the computing group into two computing groups evenly in the column direction of the sparse weight matrix;
repeating the above determining and splitting until the total number of effective weights in each computing group is less than (P×Q)/2; and
determining a minimum number of unit blocks included in each computing group in the sparse weight matrix as a group division number n, and dividing the sparse weight matrix in the column direction into a plurality of computing groups according to n.

### Claim 4 (depends on 1)

The method of claim 1, wherein obtaining the effective weight address corresponding to each effective weight in the computing group comprises:
reading each effective weight in the computing group sequentially by the PE array; and
determining a number of zero weights between a current effective weight and a previous effective weight as an effective weight address of the current effective weight, and storing the number of zero weights into a storage address corresponding to the current effective weight of the computing group.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
reading a convolution computation value; and
performing convolution computation or fully connected layer computation.

### Claim 6 (depends on 5)

The method of claim 5, wherein reading the convolution computation value comprises:
obtaining an effective weight corresponding to an effective weight address and a storage address of the effective weight in a non-sparse weight matrix according to the effective weight address of each computing group of the sparse weight matrix through the P×Q PE units in the PE array; and
reading the convolution computation value corresponding to the effective weight according to the storage address of the effective weight in the non-sparse weight matrix.

### Claim 7 (depends on 5)

The method of claim 5, wherein performing convolution computation or fully connected layer computation comprises:
performing convolution computation or fully connected layer computation in a neural network model based on deep learning according to the convolution computation value corresponding to the effective weight in each computing group.

### Claim 8 (depends on 1)

The method of claim 1, wherein the P×Q PE units in the PE array are 8×8 PE units.

### Claim 9

An apparatus for processing sparse data comprising:
a reconfigurable processor comprising a PE array, in which the PE array comprises P×Q PE units; and
a memory configured to store instructions executable by the processor;
wherein when the instructions is executed by the processor, the processor is configured to:
divide a sparse weight matrix to be calculated into at least one unit block;
group a plurality of unit blocks into a computing group; and
obtain an effective weight address corresponding to each effective weight in the computing group.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to:
divide the sparse weight matrix into the at least one unit block by taking P×Q unit blocks as a division unit in a row direction and a column direction of the sparse weight matrix, wherein each unit block comprises at least one effective weight.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to:
group the plurality of unit blocks in the sparse weight matrix into a computing group in a column direction of the sparse weight matrix;
determine whether a total number of effective weights in the computing group is more than (P×Q)/2;
in response to the total number of effective weights in the computing group being more than (P×Q)/2, split the computing group into two computing groups evenly in the column direction of the sparse weight matrix;
repeat the above determining and splitting until the total number of effective weights in each computing group is less than (P×Q)/2; and
determine a minimum number of unit blocks included in each computing group in the sparse weight matrix as a group division number n, and divide the sparse weight matrix in the column direction into a plurality of computing groups according to n.

### Claim 12 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to:
read each effective weight in the computing group sequentially by the PE array; and
determine a number of zero weights between a current effective weight and a previous effective weight as an effective weight address of the current effective weight, and storing the number of zero weights into a storage address corresponding to the current effective weight of the computing group.

### Claim 13 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to:
read a convolution computation value; and
perform convolution computation or fully connected layer computation.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the processor is further configured to:
obtain an effective weight corresponding to an effective weight address and a storage address of the effective weight in a non-sparse weight matrix according to the effective weight address of each computing group of the sparse weight matrix through the P×Q PE units in the PE array; and
read the convolution computation value corresponding to the effective weight according to the storage address of the effective weight in the non-sparse weight matrix.

### Claim 15 (depends on 13)

The apparatus of claim 13, wherein the processor is further configured to:
perform convolution computation or fully connected layer computation in a neural network model based on deep learning according to the convolution computation value corresponding to the effective weight in each computing group.

### Claim 16 (depends on 9)

The apparatus of claim 9, wherein the P×Q PE units in the PE array are 8×8 PE units.
