IP Library Granted Patent US 10,915,297
Granted Patent B1
US 10,915,297 · App. 16/186,620 · Granted Feb 9, 2021

Hardware accelerator for systolic matrix multiplication

Inventors: Ran Halutz (Ramat HaSharon, IL); Tomer Rothschild (Ein-Vered, IL); Ron Shalev (Pardes Hanna-Karkur, IL)
Assignee: HABANA LABS LTD.
G06F7/5443G06F15/8046G06F17/16G06F2207/3892
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,915,297
App. No.
16/186,620
Granted
Feb 9, 2021
Kind
B1
Abstract

Computational apparatus includes a systolic array of processing elements. In each of a sequence of processing cycles, the processing elements in a first row of the array each receive a respective first plurality of first operands, while the processing elements in a first column of the array each receive a respective second plurality of second operands. Each processing element, except in the first row and first column, receives the respective first and second pluralities of the operands from adjacent processing elements in a preceding row and column of the array. Each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in accumulators. Synchronization logic loads a succession of first and second vectors of the operands into the array, and upon completion of processing triggers the processing elements to transfer respective data values from the accumulators out of the array.

Claims (69)

1. Computational apparatus, comprising:

a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators configured such that in each of a sequence of processing cycles, the processing elements perform the following steps concurrently:

the processing elements in a first row of the systolic array receive a first vector of first operands, such that each of the processing elements in the first row receives a respective first plurality of the first operands, while the processing elements in a first column of the systolic array receive a second vector of second operands, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

each processing element, except in the first row and first column, receives the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in the accumulators; and

synchronization logic, which is coupled to load a succession of the first and second vectors into the first row and first column of the systolic array, and upon completion of processing of the succession by the systolic array, to trigger the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein the processing elements are configured to pass the data values that were computed over a first succession of the first and second vectors along the columns of the systolic array for transfer out of the systolic array concurrently with processing the operands in a second succession of the first and second vectors and accumulating the products of the operands in the accumulators.

2. The apparatus according to claim 1 , wherein the accumulators in each processing element comprise first accumulators, in which the products are accumulated, and second accumulators,

wherein the processing elements are configured to pass stored output data values from the second accumulators to a succeeding processing element along a respective column of the systolic array, to receive new output data values from a preceding processing element along the respective column, and to store the new output data values in the second accumulators.

3. The apparatus according to claim 1 , wherein the first and second pluralities of the first and second operands each respectively comprise two of the first operands and two of the second operands, whereby four different pairs of the first and second operands are multiplied together by each processing element.

4. The apparatus according to claim 1 , wherein each of the first and second successions of the first and second vectors comprises a respective pair of matrices to be multiplied together.

5. The apparatus according to claim 4 , wherein the pair of the matrices comprises a first matrix and a second matrix, and wherein the synchronization logic is coupled to receive successive rows of the first matrix and columns of the second matrix from a memory and to apply different, respective offsets to successive matrix elements in the received columns of the second matrix and rows of the first matrix in order to assemble the succession of the first and second vectors for input to the systolic array.

6. The apparatus according to claim 4 , wherein the processing elements are arranged to compute and output an outer product of each pair of the matrices.

7. The apparatus according to claim 1 , and comprising a random-access memory (RAM), which is coupled to receive and store the data values that are output successively from the accumulators in an output row of the systolic array over the sequence of processing cycles.

8. Computational apparatus, comprising:

a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators configured such that in each of a sequence of processing cycles, the processing elements perform the following steps concurrently:

the processing elements in a first row of the systolic array receive a first vector of first operands, such that each of the processing elements in the first row receives a respective first plurality of the first operands, while the processing elements in a first column of the systolic array receive a second vector of second operands, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

each processing element, except in the first row and first column, receives the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in the accumulators; and

synchronization logic, which is coupled to load a succession of the first and second vectors into the first row and first column of the systolic array, and upon completion of processing of the succession by the systolic array, to trigger the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein the accumulators in each processing element comprise first accumulators, in which the products are accumulated, and second accumulators,

wherein the processing elements are configured to pass stored output data values from the second accumulators to a succeeding processing element along a respective column of the systolic array, to receive new output data values from a preceding processing element along the respective column, and to store the new output data values in the second accumulators, and

wherein the synchronization logic is configured, upon completion of the processing of the succession of the first and second vectors by the systolic array, to trigger the processing elements to transfer the respective data values from the first accumulators to the second accumulators for output from the systolic array by transfer along the respective columns.

9. Computational apparatus, comprising:

a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators configured such that in each of a sequence of processing cycles, the processing elements perform the following steps concurrently:

the processing elements in a first row of the systolic array receive a first vector of first operands, such that each of the processing elements in the first row receives a respective first plurality of the first operands, while the processing elements in a first column of the systolic array receive a second vector of second operands, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

each processing element, except in the first row and first column, receives the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in the accumulators; and

synchronization logic, which is coupled to load a succession of the first and second vectors into the first row and first column of the systolic array, and upon completion of processing of the succession by the systolic array, to trigger the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein the accumulators in each processing element comprise first accumulators, in which the products are accumulated, and second accumulators,

wherein the processing elements are configured to pass stored output data values from the second accumulators to a succeeding processing element along a respective column of the systolic array, to receive new output data values from a preceding processing element along the respective column, and to store the new output data values in the second accumulators, and

wherein each of the second accumulators in each processing element is coupled to receive and transfer the respective data values that are accumulated in at least two of the first accumulators in the processing element.

10. Computational apparatus, comprising:

a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators configured such that in each of a sequence of processing cycles, the processing elements perform the following steps concurrently:

the processing elements in a first row of the systolic array receive a first vector of first operands, such that each of the processing elements in the first row receives a respective first plurality of the first operands, while the processing elements in a first column of the systolic array receive a second vector of second operands, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

each processing element, except in the first row and first column, receives the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in the accumulators; and

synchronization logic, which is coupled to load a succession of the first and second vectors into the first row and first column of the systolic array, and upon completion of processing of the succession by the systolic array, to trigger the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein the accumulators in each processing element comprise first accumulators, in which the products are accumulated, and second accumulators,

wherein the processing elements are configured to pass stored output data values from the second accumulators to a succeeding processing element along a respective column of the systolic array, to receive new output data values from a preceding processing element along the respective column, and to store the new output data values in the second accumulators, and

wherein each processing element comprises a respective register file, which comprises registers that serve as the first and second accumulators and comprises write and read ports for writing data to and reading data from the registers.

11. Computational apparatus, comprising:

a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators configured such that in each of a sequence of processing cycles, the processing elements perform the following steps concurrently:

the processing elements in a first row of the systolic array receive a first vector of first operands, such that each of the processing elements in the first row receives a respective first plurality of the first operands, while the processing elements in a first column of the systolic array receive a second vector of second operands, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

each processing element, except in the first row and first column, receives the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

each processing element multiplies pairs of the first and second operands together to generate multiple respective products, and accumulates the products in the accumulators; and

synchronization logic, which is coupled to load a succession of the first and second vectors into the first row and first column of the systolic array, and upon completion of processing of the succession by the systolic array, to trigger the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein the first and second pluralities of the first and second operands each respectively comprise two of the first operands and two of the second operands, whereby four different pairs of the first and second operands are multiplied together by each processing element, and

wherein each processing elements comprises four processing blocks, each of which comprises a respective multiplier and one or more of the accumulators and is configured to multiply and accumulate the products of one of the four different pairs of the first and second operands.

12. A method for computation, comprising:

providing a systolic array of processing elements arranged in a grid of rows and columns, each processing element comprising multipliers and accumulators;

in each of a sequence of processing cycles, performing the following steps concurrently:

receiving a first vector of first operands in a first row of the systolic array, such that each of the processing elements in the first row receives a respective first plurality of the first operands, and receiving a second vector of second operands in a first column of the systolic array, such that each of the processing elements in the first column receives a respective second plurality of the second operands;

receiving in each processing element, except in the first row and first column, the respective first and second pluralities of the first and second operands from adjacent processing elements in a preceding row and column of the systolic array, respectively; and

multiplying pairs of the first and second operands together in the processing elements to generate multiple respective products, and accumulating the products in the accumulators;

loading a succession of the first and second vectors into the first row and column of the systolic array; and

upon completion of processing of the succession by the systolic array, triggering the processing elements to transfer respective data values from the accumulators out of the systolic array,

wherein triggering the processing elements causes the processing elements to pass the data values that were computed over a first succession of the first and second vectors along the columns of the systolic array for transfer out of the systolic array concurrently with processing the operands in a second succession of the first and second vectors and accumulating products of the operands in the accumulators.

13. The method according to claim 12 , wherein the accumulators in each processing element comprise first accumulators, in which the products are accumulated, and second accumulators,

wherein triggering the processing elements causes the processing elements to pass stored output data values from the second accumulators to a succeeding processing element along a respective column of the systolic array, to receive new output data values from a preceding processing element along the respective column, and to store the new output data values in the second accumulators.

14. The method according to claim 13 , wherein triggering the processing elements comprises triggering the processing elements upon completion of the processing of the succession of the first and second vectors by the systolic array to transfer the respective data values from the first accumulators to the second accumulators for output from the systolic array by transfer along the respective columns.

15. The method according to claim 13 , wherein each of the second accumulators in each processing element receives and transfers the respective data values that are accumulated in at least two of the first accumulators in the processing element.

16. The method according to claim 13 , wherein each processing element comprises a respective register file, which comprises registers that serve as the first and second accumulators and comprises write and read ports for writing data to and reading data from the registers.

17. The method according to claim 12 , wherein the first and second pluralities of the first and second operands each respectively comprise two of the first operands and two of the second operands, whereby four different pairs of the first and second operands are multiplied together by each processing.

18. The method according to claim 17 , wherein each processing elements comprises four processing blocks, each of which comprises a respective multiplier and one or more of the accumulators and multiplies and accumulates the products of one of the four different pairs of the first and second operands.

19. The method according to claim 12 , wherein each of the first and second successions of the first and second vectors comprises a respective pair of matrices to be multiplied together.

20. The method according to claim 19 , wherein the pair of the matrices comprises a first matrix and a second matrix, and wherein loading the succession of the first and second vectors comprises receiving successive rows of the first matrix and columns of the second matrix from a memory and applying different, respective offsets to successive matrix elements in the received columns of the second matrix and rows of the first matrix in order to assemble the succession of the first and second vectors for input to the systolic array.

21. The method according to claim 19 , wherein processing the succession of the first and second vectors comprises computing and outputting an outer product of each pair of the matrices.

22. The method according to claim 12 , and comprising outputting the data values successively from the accumulators in an output row of the systolic array over the sequence of processing cycles to a random-access memory (RAM), and storing the data values in the RAM.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 6, 2025
From: HABANA LABS LTD.
To: INTEL OVERSEAS FUNDING CORPORATION
Reel/Frame 073008/0642 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2018
From: HALUTZ, RAN; SHALEV, RON; ROTHSCHILD, TOMER
To: HABANA LABS LTD.
Reel/Frame 047469/0867 →
Continuity (1)
Provisional Application 62586218 · Nov 15, 2017
Cited By (38)
US 12,191,257 US 12,197,534 US 12,216,318 US 12,217,056 US 12,236,241 US 12,242,122 US 12,259,575 US 12,271,595 US 12,283,584 US 12,298,608 US 12,327,116 US 12,339,490 US 12,353,006 US 12,353,988 US 12,399,333 US 12,423,058 US 12,436,346 US 12,442,997 US 12,442,998 US 12,442,999 US 12,443,000 US 12,443,407 US 12,468,103 US 12,517,700 US 12,536,133 US 12,564,047 US 12,568,809 US 12,615,087 US 12,645,425 US 12,663,966 US 12,670,357 US 12,674,948 US 12,674,949 US 12,681,693 US 12,690,438 US 12,693,990 US 12,699,240 US 12,706,680