# US 2024/0004830 A1 · Floorplan-optimized matrix extension architecture for processors

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

- Number: US 2024/0004830 A1
- Document ID: US20240004830A1
- Status: Published application
- Kind: A1
- Application number: 17/982,450
- Filed: 2022-11-07
- Published: 2024-01-04
- Earliest claimed: 2022-07-01
- Assignees: Alibaba (China) Co., Ltd.
- Applicants: Alibaba (China) Co., Ltd.
- Inventors: Qichen ZHANG; Lide DUAN; Shengcheng WANG
- Web page: https://patentgrep.com/patent/US20240004830A1

## CPC

- G06F 15/8046: {Systolic arrays}
- G06F 7/50: Adding; Subtracting (G06F7/483 - G06F7/491, G06F7/544 - G06F7/556 take precedence)
- G06F 7/523: Multiplying only
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure includes a processor. The processor may include a systolic array of processing elements; a first group of buffers coupled to the systolic array, wherein the first group comprises one or more first buffers; a second group of buffers coupled to the systolic array, wherein the second group comprises one or more second buffers; an accumulator coupled to the systolic array; and a third group of buffers coupled to the accumulator, wherein the third group comprises one or more third buffers.

## Claims

### Claim 1

A processor, comprising:
a systolic array of processing elements;
a first group of buffers coupled to the systolic array, wherein the first group comprises one or more first buffers;
a second group of buffers coupled to the systolic array, wherein the second group comprises one or more second buffers;
an accumulator coupled to the systolic array; and
a third group of buffers coupled to the accumulator, wherein the third group comprises one or more third buffers.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the processor is a central processing unit (CPU).

### Claim 3 (depends on 1)

The processor of claim 1, wherein:
the first group comprises two buffers, the second group comprises two buffers, and the third group comprises four buffers.

### Claim 4 (depends on 1)

The processor of claim 1, wherein:
the first group comprises a first plurality of buffers individually coupled to the systolic array; and
the second group comprises a second plurality of buffers individually coupled to the systolic array.

### Claim 5 (depends on 4)

The processor of claim 4, wherein:
the systolic array is a two-dimensional array;
the two-dimensional array corresponds to a first side, a second side, a third side opposite to the first side, and a fourth side opposite to the second side; and
the first plurality of buffers are individually coupled to the first side and not coupled to the second side, the third side, and the fourth side.

### Claim 6 (depends on 5)

The processor of claim 5, wherein:
the second plurality of buffers are individually coupled to the second side or third side and not coupled to the first side and the fourth side.

### Claim 7 (depends on 5)

The processor of claim 5, wherein:
the accumulator is coupled to the fourth side and not coupled to the first side, the second side, and the third side.

### Claim 8 (depends on 4)

The processor of claim 4, wherein:
the first plurality of buffers are individually coupled to one or more caches of the processor; and
the second plurality of buffers are individually coupled to the one or more caches of the processor.

### Claim 9 (depends on 8)

The processor of claim 8, wherein:
the first plurality of buffers are configured to obtain first input data from the one or more caches of the processor and to transmit the first input data to the systolic array; and
the first plurality of buffers are configured to, in parallel and staggered in time, each transmit a portion of the first input data the systolic array.

### Claim 10 (depends on 9)

The processor of claim 9, wherein:
the second plurality of buffers are configured to obtain weight data from the one or more caches of the processor and to preload the weight data into the systolic array.

### Claim 11 (depends on 10)

The processor of claim 10, wherein:
the systolic array is configured to compute based on the first input data and the weight data and to, in parallel and staggered in time, transmit output data to the accumulator.

### Claim 12 (depends on 4)

The processor of claim 4, wherein:
the third group comprises a third plurality of buffers coupled to (i) the accumulator and (ii) one or more caches of the processor.

### Claim 13 (depends on 12)

The processor of claim 12, wherein:
the first plurality of buffers are coupled in parallel to the systolic array;
the second plurality of buffers are coupled in parallel to the systolic array;
the third plurality of buffers are connected in series within the third group; and
the third plurality of buffers and the accumulator form a loop.

### Claim 14 (depends on 13)

The processor of claim 13, wherein:
the third plurality of buffers are configured to:
obtain second input data from the one or more caches of the processor, and
transmit the second input data to the accumulator; and
the accumulator is configured to:
recursively generate an intermediary result based on output data from the systolic array and the second input data, and
transmit the intermediary result to the third plurality of buffers.

### Claim 15 (depends on 14)

The processor of claim 14, wherein:
the third plurality of buffers are configured to feedback the intermediary result to the accumulator; and
the accumulator is configured to recursively update the intermediary result based on the output data and the feedback intermediary result and transmit the updated intermediary result to the third plurality of buffers.

### Claim 16 (depends on 15)

The processor of claim 15, wherein the third plurality of buffers are configured to:
each store a last updated intermediary result; and
output a final result comprising the last updated intermediary results to the one or more caches of the processor.

### Claim 17 (depends on 13)

The processor of claim 13, wherein:
the first plurality of buffers are configured to obtain a first matrix A and feed the first matrix A to the systolic array;
the second plurality of buffers are configured to obtain a second matrix B and feed the second matrix B to the systolic array;
the systolic array is configured to multiply the first matrix A and the second matrix B to output A*B to the accumulator;
the accumulator is configured to obtain a third matrix C from the third plurality of buffers and generate a result of A*B+C through a plurality of loops of recursive calculations; and
the third plurality of buffers are configured to obtain and output the result of A*B+C.

### Claim 18

A computing device, comprising a memory and a processor coupled to the memory, wherein the processor comprises:
a systolic array of processing elements;
a first group of buffers coupled to the systolic array, wherein the first group comprises one or more first buffers configured to pipeline first input data into the systolic array;
a second group of buffers coupled to the systolic array, wherein the second group comprises one or more second buffers configured to broadcast weight data into the systolic array;
an accumulator coupled to the systolic array and configured to receive output data from the systolic array; and
a third group of buffers comprising one or more third buffers configured to transmit second input data to the accumulator via a first pathway of a data transmission loop and receive results from the accumulator via a second pathway of the data transmission loop.

### Claim 19 (depends on 18)

The computing device of claim 18, wherein the third group of buffers are coupled to a cache of the processor.

### Claim 20

A method, comprising:
(1) storing, by a first group of buffers of a processor, at least one or more first elements of a first matrix, the first group of buffers comprising one or more first buffers;
(2) storing, by a second group of buffers of the processor, at least one or more second elements of a second matrix, the second group of buffers comprising one or more second buffers;
(3) obtaining, by a systolic array of the processor, the one or more first elements of the first matrix from the first group of buffers and the one or more second elements of the second matrix from the second group of buffers, the systolic array comprising processing elements coupled to the first group of buffers and the second group of buffers;
(4) multiplying, by the systolic array, the one or more first elements with the one or more second to generate one or more intermediary values;
(5) obtaining, by a third group of buffers of the processor, a third matrix;
(6) obtaining, by an accumulator of the processor, one or more third elements of the third matrix from the third group of buffers and the one or more intermediary values from the systolic array;
(7) adding, by the accumulator, the one or more third elements with the one or more intermediary values to obtain an intermediary sum;
(8) transmitting, by the accumulator, the intermediary sum to the third group of buffers;
(9) storing, by the third group of buffers, the intermediary sum as the one or more third elements of the third matrix; and
(10) recursively performing, by the processor, steps (1)-(9) until a final result is stored to the third group of buffers, wherein the final result corresponds to a sum of the third matrix and a product between the first matrix and the second matrix.
