IP Library Granted Patent US 11,520,853
Granted Patent B2
US 11,520,853 · App. 16/805,339 · Granted Dec 6, 2022

Mapping convolution to a partition channel convolution engine

Inventors: Krishnakumar Narayanan Nair (Newark, CA); Rakesh Komuravelli (Fremont, CA); Abdulkadir Utku Diril (Menlo Park, CA); Ehsan Khish Ardestani Zadeh (San Jose, CA); Yuchen Hao (Fremont, CA); Martin Schatz (Seattle, WA); Thomas Mark Ulrich (Mountain View, CA); Olivia Wu (Los Altos, CA); Anup Ramesh Kadkol (Sunnyvale, CA); Amin Firoozshahian (Mountain View, CA)
Assignee: Meta Platforms, Inc.
G06F17/153G06F7/5443G06F17/16G06N20/00
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 11,520,853
App. No.
16/805,339
Granted
Dec 6, 2022
Kind
B2
Abstract

A processor system comprises two groups of registers and a hardware channel convolution processor unit. The first group of registers is configured to store data elements of channels of a portion of a convolution data matrix. Each register stores at least one data element from each channel. The second group of registers is configured to store data elements of convolution weight matrices including a separate matrix for each channel. Each register stores at least one data element from each matrix. The hardware channel convolution processor unit is configured to multiply each data element in a first and second portion of the first group of registers with a corresponding data element in the second group of registers to determine corresponding multiplication results and sum together the multiplication results for each specific channel to determine two corresponding channel convolution result data elements in a corresponding channel convolution result matrix.

Claims (47)

1. A processor system, comprising:

a first group of registers configured to store data elements of a plurality of channels of a portion of a convolution data matrix, wherein each register of the first group of registers stores at least one data element from each of the plurality of channels;

a second group of registers configured to store data elements of a plurality of convolution weight matrices including a separate convolution weight matrix for each of the plurality of channels, wherein each register of the second group of registers stores at least one data element from each of the plurality of convolution weight matrices; and

a hardware processor unit configured to:

for each data element in a first portion of the first group of registers, multiply the data element in the first portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in first multiplication results, wherein the first portion corresponds to a first sub matrix of the convolution data matrix;

for each data element in a second portion of the first group of registers, multiply the data element in the second portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in second multiplication results, wherein the second portion corresponds to a second sub matrix of the convolution data matrix that is different from the first sub matrix but the second sub matrix at least in part overlaps with the first sub matrix of the convolution data matrix; and

for each specific channel of the plurality of channels, sum together ones of the first multiplication results corresponding to the specific channel to determine one corresponding channel convolution result data element in a corresponding channel convolution result matrix and sum together ones of the second multiplication results corresponding to the specific channel to determine another one corresponding channel convolution result data element in the corresponding channel convolution result matrix.

2. The system of claim 1 , wherein a total count of the stored data elements of the first group of registers is greater than a total count of the stored data elements of the second group of registers.

3. The system of claim 1 , wherein the hardware processor unit is configured to determine the first multiplication results and the second multiplication results at least in part concurrently.

4. The system of claim 1 , wherein the hardware processor unit is configured to determine channel convolution result data elements associated with the first portion of the first group of registers and the second portion of the first group of registers at least in part concurrently.

5. The system of claim 1 , wherein the data elements in the first portion of the first group of registers match at least two-thirds of the data elements in the second portion of the first group of registers.

6. The system of claim 1 , wherein the first portion of the first group of registers overlaps with the second portion of the first group of registers and the second portion of the first group of registers includes a group of data elements that are different from the data elements in the first portion of the first group of registers.

7. The system of claim 1 , wherein the hardware processor unit is configured to receive a plurality of data elements of the first group of registers corresponding to a same channel of the convolution data matrix and a plurality of corresponding data elements of the second group of registers corresponding to the separate convolution weight matrix for the same channel of the convolution data matrix.

8. The system of claim 7 , wherein the hardware processor unit includes a plurality of vector units, each vector unit of the plurality of vector units includes a different vector multiply unit and a different vector adder unit.

9. The system of claim 8 , wherein each of the different vector adder units includes a different adder tree.

10. The system of claim 1 , wherein the convolution data matrix is a three-dimensional machine learning data matrix.

11. The system of claim 1 , wherein the hardware processor unit is further configured to: process the data elements stored in the first group of registers by channel into a plurality of data input vectors, wherein each of the plurality of data input vectors includes data elements corresponding to a two-dimensional sub-matrix of the convolution data matrix.

12. The system of claim 1 , wherein the hardware processor unit is further configured to: process the data elements stored in the second group of registers into a plurality of weight input vectors, wherein each of the plurality of weight input vectors includes data elements corresponding to one of the plurality of convolution weight matrices.

13. The system of claim 1 , wherein each of the plurality of convolution weight matrices is a 3×3, 5×5, 7×7, 9×9, or 11×11 matrix.

14. The system of claim 1 , wherein the data elements stored in the first group of registers are 4-bit, 8-bit, 2-byte, or 4-byte elements.

15. The system of claim 1 , wherein a total count of the stored data elements of each of the first group of registers is a multiple of a cache line size.

16. A method, comprising:

storing at a hardware processing element in a first group of registers data elements of a plurality of channels of a first portion of a convolution data matrix, wherein each register of the first group of registers stores at least one data element from each of the plurality of channels;

storing at the hardware processing element in a second group of registers data elements of a subset of a set of convolution weight matrices including a separate convolution weight matrix for each of the plurality of channels, wherein each register of the second group of registers stores at least one data element from each of the subset of the set of convolution weight matrices;

for each data element in a first portion of the first group of registers, multiplying the data element in the first portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in first multiplication results, wherein the first portion corresponds to a first sub matrix of the convolution data matrix;

for each data element in a second portion of the first group of registers, multiplying the data element in the second portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in second multiplication results, wherein the second portion corresponds to a second sub matrix of the convolution data matrix that is different from the first sub matrix but the second sub matrix at least in part overlaps with the first sub matrix of the convolution data matrix;

for each specific channel of the plurality of channels, summing together ones of the first multiplication results corresponding to the specific channel to determine one corresponding channel convolution result data element in a corresponding channel convolution result matrix; and

for each specific channel of the plurality of channels, summing together ones of the second multiplication results corresponding to the specific channel to determine another one corresponding channel convolution result data element in the corresponding channel convolution result matrix.

17. The method of claim 16 , further comprising:

saving in the first group of registers data elements that overlap between the first portion of the convolution data matrix and a second portion of the convolution data matrix; and

storing in the first group of registers a three-dimensional slice of data elements of a plurality of channels of the second portion of the convolution data matrix, wherein the data elements of the three-dimensional slice are different from the data elements of the first portion of the convolution data matrix.

18. The method of claim 17 , wherein the three-dimensional slice of data elements is a vertical column or a horizontal row of the second portion of the convolution data matrix.

19. The method of claim 16 , wherein a total count of the stored data elements of each of the first group of registers is a multiple of a cache line size, and wherein the total count of the stored data elements of the first group of registers is greater than a total count of the stored data elements of the second group of registers.

20. A method, comprising:

receiving a convolution operation instruction specifying a convolution data matrix and a set of convolution weight matrices;

assigning a different portion of the convolution data matrix to each of a plurality of processing elements;

transmitting a plurality of data elements corresponding to the different assigned portion of the convolution data matrix to each of the plurality of processing elements;

broadcasting to each of the plurality of processing elements assigned a same channel of the convolution data matrix a same subset of the set of convolution weight matrices;

for each of the plurality of processing elements:

storing at a hardware processing element in a first group of registers data elements of a plurality of channels of a first portion of the convolution data matrix, wherein each register of the first group of registers stores at least one data element from each of the plurality of channels;

storing at the hardware processing element in a second group of registers data elements of a subset of the set of convolution weight matrices including a separate convolution weight matrix for each of the plurality of channels, wherein each register of the second group of registers stores at least one data element from each of the subset of the set of convolution weight matrices;

for each data element in a first portion of the first group of registers, multiplying the data element in the first portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in first multiplication results, wherein the first portion corresponds to a first sub matrix of the convolution data matrix;

for each data element in a second portion of the first group of registers, multiplying the data element in the second portion with a corresponding data element in the second group of registers to determine a corresponding multiplication result in second multiplication results, wherein the second portion corresponds to a second sub matrix of the convolution data matrix that is different from the first sub matrix but the second sub matrix at least in part overlaps with the first sub matrix of the convolution data matrix;

for each specific channel of the plurality of channels, summing together ones of the first multiplication results corresponding to the specific channel to determine one corresponding channel convolution result data element in a corresponding channel convolution result matrix; and

for each specific channel of the plurality of channels, summing together ones of the second multiplication results corresponding to the specific channel to determine another one corresponding channel convolution result data element in the corresponding channel convolution result matrix;

receiving from the plurality of processing elements channel convolution result data elements of the corresponding channel convolution result matrix determined using hardware channel convolution processor units of the plurality of processing elements; and

storing the corresponding channel convolution result matrix to a memory location, wherein the convolution data matrix and the corresponding channel convolution result matrix are stored using a channel-first layout format.

Assignments (2)
CHANGE OF NAME Recorded Nov 19, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058214/0351 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 12, 2020
From: NAIR, KRISHNAKUMAR NARAYANAN; KOMURAVELLI, RAKESH; DIRIL, ABDULKADIR UTKU; ZADEH, EHSAN KHISH ARDESTANI; HAO, YUCHEN; SCHATZ, MARTIN; ULRICH, THOMAS MARK; WU, OLIVIA; KADKOL, ANUP RAMESH; FIROOZSHAHIAN, AMIN
To: FACEBOOK, INC.
Reel/Frame 052926/0945 →
Continuity (1)
Related Publication 20210271451A1 · Sep 2, 2021
Cited By (2)
US 12,307,370 US 12,699,873