IP Library Granted Patent US 12,229,215
Granted Patent B2
US 12,229,215 · App. 18/487,918 · Granted Feb 18, 2025

Performing matrix multiplication in a streaming processor

Inventors: Yun Du (San Diego, CA); Gang Zhong (San Diego, CA); Fei Wei (San Diego, CA); Yibin Zhang (San Diego, CA); Jing Han (San Jose, CA); Hongjiang Shang (San Diego, CA); Elina Kamenetskaya (Belmont, MA); Minjie Huang (San Diego, CA); Alexei Vladimirovich Bourd (San Diego, CA); Chun Yu (Rancho Santa Fe, CA); Andrew Evan Gruber (Arlington, MA); Eric Demers (San Diego, CA)
Assignee: QUALCOMM Incorporated
G06F17/16G06F7/57G06F9/30036G06F9/3851G06F9/3887
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 12,229,215
App. No.
18/487,918
Granted
Feb 18, 2025
Kind
B2
Abstract

The present disclosure relates to methods and apparatus for compute processing. For example, disclosed techniques facilitate improving performance of matrix multiplication in streaming processor. Aspects of the present disclosure can execute, with a load control unit, a first load instruction to load a set of input data of an input matrix from a first memory to a second memory. Aspects of the present disclosure can also execute, with the load control unit, a second load instruction to load a set of weight data of a weight matrix from the first memory to the second memory. Additionally, aspects of the present disclosure can perform, with an ALU component, a matrix multiplication operation using the set of input data and the set of weight data to generate an output matrix. Further, aspects of the present disclosure can store the output matrix at a general purpose register accessible to the ALU component.

Claims (52)

1. An apparatus for data processing, comprising:

at least one memory; and

at least one processor coupled to the at least one memory and configured to:

fetch an element of an input matrix from graphics memory;

determine whether the element of the input matrix is to be used across multiple threads; and

store the element of the input matrix at a buffer until a workgroup corresponding to at least one of the multiple threads is executed in response to a first determination that the element of the input matrix is to be used across multiple threads, or store the element of the input matrix at a general purpose register (GPR) in response to a second determination that the element of the input matrix is not to be used across multiple threads.

2. The apparatus of claim 1 , wherein the at least one processor is further configured to:

broadcast the element of the input matrix when a thread in the multiple threads is executed.

3. The apparatus of claim 1 , wherein to determine whether the element of the input matrix is to be used across the multiple threads, the at least one processor is configured to:

determine that the element of the input matrix is not to be used across the multiple threads, and wherein to store the element of the input matrix at the buffer or at the GPR based on the determination, the at least one processor is configured to:

store the element of the input matrix at the GPR based on the determination that the element of the input matrix is not to be used across the multiple threads.

4. The apparatus of claim 1 , wherein the at least one processor is further configured to:

fetch a first element of a weight matrix from the graphics memory; and

store the first element of the weight matrix at the buffer.

5. The apparatus of claim 4 , and wherein to store the element of the input matrix at the buffer, the at least one processor is configured to:

store the element of the input matrix at the buffer in a pattern that is based on matrix multiplication, and wherein to store the first element of the weight matrix at the buffer, the at least one processor is configured to:

store the first element of the weight matrix at the buffer in the pattern that is based on the matrix multiplication.

6. The apparatus of claim 4 , wherein the at least one processor is further configured to:

perform, via the multiple threads, a matrix multiplication operation with respect to the element of the input matrix and the first element of the weight matrix.

7. The apparatus of claim 1 , wherein to fetch the element of the input matrix from the graphics memory, the at least one processor is configured to;

fetch the element of the input matrix from the graphics memory via a single block load instruction.

8. The apparatus of claim 1 , wherein the apparatus is a wireless communication device comprising a transceiver.

9. The apparatus of claim 1 , wherein, to determine whether the element of the input matrix is to be used across multiple threads, the at least one processor is configured to:

determine that the element of the input matrix is to be used across multiple threads, wherein, to store the element of the input matrix at the buffer until the workgroup corresponding to at least one of the multiple threads is executed in response to the first determination that the element of the input matrix is to be used across multiple threads, or store the element of the input matrix at the GPR in response to the second determination that the element of the input matrix is not to be used across multiple threads, the at least one processor is configured to:

store the element of the input matrix at the buffer until the workgroup corresponding to at least one of the multiple threads is executed in response to the determination that the element of the input matrix is to be used across multiple threads.

10. The apparatus of claim 9 , wherein the at least one processor is further configured to:

fetch a second element of the input matrix from graphics memory;

determine that the second element of the input matrix is not to be used across multiple threads; and

store the second element of the input matrix at the GPR in response to the determination that the second element of the input matrix is not to be used across multiple threads.

11. A method of data processing, comprising:

fetching an element of an input matrix from graphics memory;

determining whether the element of the input matrix is to be used across multiple threads; and

storing the element of the input matrix at a buffer until a workgroup corresponding to at least one of the multiple threads is executed in response to a first determination that the element of the input matrix is to be used across multiple threads, and or storing the element of the input matrix at a general purpose register (GPR) in response to a second determination that the element of the input matrix is not to be used across multiple threads.

12. The method of claim 11 , further comprising:

broadcasting the element of the input matrix when a thread in the multiple threads is executed.

13. The method of claim 11 , wherein determining whether the element of the input matrix is to be used across the multiple threads comprises:

determining that the element of the input matrix is not to be used across the multiple threads, and wherein storing the element of the input matrix at the buffer or at the GPR based on the determination comprises:

storing the element of the input matrix at the GPR based on the determination that the element of the input matrix is not to be used across the multiple threads.

14. The method of claim 11 , further comprising:

fetching a first element of a weight matrix from the graphics memory; and

storing the first element of the weight matrix at the buffer.

15. The method of claim 14 , and wherein storing the element of the input matrix at the buffer comprises:

storing the element of the input matrix at the buffer in a pattern that is based on matrix multiplication, and wherein storing the first element of the weight matrix at the buffer comprises:

storing the first element of the weight matrix at the buffer in the pattern that is based on the matrix multiplication.

16. The method of claim 14 , further comprising:

performing, via the multiple threads, a matrix multiplication operation with respect to the element of the input matrix and the first element of the weight matrix.

17. The method of claim 11 , wherein fetching the element of the input matrix from the graphics memory comprises:

fetching the element of the input matrix from the graphics memory via a single block load instruction.

18. At least one non-transient computer-readable medium storing computer executable code for data processing, comprising code to:

fetch an element of an input matrix from graphics memory;

determine whether the element of the input matrix is to be used across multiple threads; and

store the element of the input matrix at a buffer until a workgroup corresponding to at least one of the multiple threads is executed in response to a first determination that the element of the input matrix is to be used across multiple threads, and or store the element of the input matrix at a general purpose register (GPR) in response to a second determination that the element of the input matrix is not to be used across multiple threads.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 17, 2023
From: DU, YUN; ZHONG, GANG; WEI, FEI; ZHANG, YIBIN; HAN, JING; SHANG, HONGJIANG; KAMENETSKAYA, ELINA; HUANG, MINJIE; BOURD, ALEXEI VLADIMIROVICH; YU, CHUN; GRUBER, ANDREW EVAN; DEMERS, ERIC
To: QUALCOMM INCORPORATED
Reel/Frame 065252/0081 →
Continuity (3)
Continuation 17137226 · Dec 29, 2020
Provisional Application 62955311 · Dec 30, 2019
Related Publication 20240037183A1 · Feb 1, 2024
References Cited (21)
US 20070271325A1 · Juffa · 2007 [cited by examiner]
US 20080301694A1 · Mattson · 2008 [cited by applicant]
US 20120133654A1 · Redgrave · 2012 [cited by examiner]
US 20150379680A1 · Du · 2015 [cited by examiner]
US 20180157465A1 · Bittner et al. · 2018 [cited by applicant]
US 20180307980A1 · Barik et al. · 2018 [cited by applicant]
US 20190026250A1 · Das Sarma et al. · 2019 [cited by applicant]
US 20190303167A1 · Hughes et al. · 2019 [cited by applicant]
US 20190324746A1 · Maiyuran et al. · 2019 [cited by applicant]
US 20200051317A1 · Muthler et al. · 2020 [cited by applicant]
US 20200349047A1 · Faibish et al. · 2020 [cited by applicant]
US 20200394041A1 · Lueh · 2020 [cited by examiner]
US 20210027156A1 · Zhu · 2021 [cited by examiner]
US 20210124794A1 · Nair · 2021 [cited by examiner]
US 20210200836A1 · Du · 2021 [cited by applicant]
CN 108604216A · 2018 [cited by applicant]
TW 201626265A · 2016 [cited by applicant]
WO WO2009145917A1 · 2009 [cited by examiner]
International Preliminary Report on Patentability—PCT/US2020/067581 The International Bureau of WIPO—Geneva, Switzerland, Jul. 14, 2022. [cited by applicant]
International Search Report and Written Opinion—PCT/US2020/067581—ISA/EPO—Apr. 20, 2021. [cited by applicant]
Taiwan Search Report—TW109146852—TIPO—Jul. 2, 2024. [cited by applicant]