IP Library Granted Patent US 12,475,191
Granted Patent B2
US 12,475,191 · App. 18/515,062 · Granted Nov 18, 2025

Application programming interface to accelerate matrix operations

Inventors: Piotr Majcher (Sunnyvale, CA); Mostafa Hagog (Folsom, CA); Philippe Vandermersch (San Jose, CA)
Assignee: NVIDIA Corporation
G06F17/16G06F9/3001G06F9/30145G06N3/08G06N5/046
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,475,191
App. No.
18/515,062
Granted
Nov 18, 2025
Kind
B2
Abstract

Apparatuses, systems, and techniques to determine a matrix multiplication algorithm for a matrix multiplication operation. In at least one embodiment, a matrix multiplication operation is analyzed to determine an appropriate matrix multiplication algorithm to perform the matrix multiplication algorithm.

Claims (104)

1 . A non-transitory machine-readable medium having stored thereon a Get Heuristic application programming interface (API), which if performed by one or more processors, causes the one or more processors to at least:

determine possible algorithms for a matrix multiplication operation, wherein the Get Heuristic API includes parameters comprising:

an operation description parameter including a pointer to a matrix multiplication operation description;

input matrices;

a search preferences parameter including a pointer to a data object comprising search preferences;

an algorithm count parameter to specify a desired number of algorithms;

a results array parameter to specify an array to store algorithm identifiers in order of increasing estimated compute time; and

an operation status parameter to indicate if the Get Heuristic API is successful.

2 . The non-transitory machine-readable medium of claim 1 , wherein the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor.

3 . The non-transitory machine-readable medium of claim 1 , wherein the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms.

4 . The non-transitory machine-readable medium of claim 1 , wherein the data object comprising search preferences indicates a preferred resource utilization.

5 . The non-transitory machine-readable medium of claim 1 , wherein the algorithm count parameter includes an integer value of the desired number.

6 . The non-transitory machine-readable medium of claim 1 , wherein the machine-readable medium further stores thereon a matrix multiply API to perform an algorithm indicated by the Get Heuristic API.

7 . The non-transitory machine-readable medium of claim 1 , wherein the machine-readable medium further stores thereon a matrix multiply API to compute a matrix multiplication of matrices, wherein the matrix multiply API includes parameters comprising:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API.

8 . The non-transitory machine-readable medium of claim 1 , wherein:

the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor;

the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms;

the data object comprising search preferences indicates a preferred resource utilization;

the algorithm count parameter includes an integer value of the desired number;

the machine-readable medium further stores thereon a matrix multiply API to perform an algorithm indicated by the Get Heuristic API, wherein the matrix multiply API includes parameters comprising:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API.

9 . A computer-implemented method, comprising:

in response to a Get Heuristic application programming interface (API) call, causing one or more processors to at least:

determine possible algorithms for a matrix multiplication operation, wherein the Get Heuristic API call includes parameters comprising:

an operation description parameter including a pointer to a matrix multiplication operation description;

input matrices;

a search preferences parameter including a pointer to a data object comprising search preferences;

an algorithm count parameter to specify a desired number of algorithms;

a results array parameter to specify an array to store algorithm identifiers in order of increasing estimated compute time; and

an operation status parameter to indicate if the Get Heuristic API call is successful.

10 . The computer-implemented method of claim 9 , wherein the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor.

11 . The computer-implemented method of claim 9 , wherein the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms.

12 . The computer-implemented method of claim 9 , wherein the data object comprising search preferences indicates a preferred resource utilization.

13 . The computer-implemented method of claim 9 , wherein the algorithm count parameter includes an integer value of the desired number.

14 . The computer-implemented method of claim 9 , further comprising, in response to a matrix multiply API call, causing a matrix multiply operation to perform one or more of the determined possible algorithms.

15 . The computer-implemented method of claim 9 , further comprising, in response to a matrix multiply API call, causing a matrix multiply operation to be performed, wherein the matrix multiply API call comprises parameters including:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API call.

16 . The computer-implemented method of claim 9 , wherein:

the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor;

the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms;

the data object comprising search preferences indicates a preferred resource utilization;

the algorithm count parameter includes an integer value of the desired number;

the computer-implemented method further comprises performing an algorithm indicated by the Get Heuristic API call, wherein a matrix multiply API call includes parameters comprising:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API call.

17 . A processor, comprising:

one or more circuits to, in response to a Get Heuristic application programming interface (API) call, at least:

determine possible algorithms for a matrix multiplication operation, wherein the Get Heuristic API call includes parameters comprising:

an operation description parameter including a pointer to a matrix multiplication operation description;

input matrices;

a search preferences parameter including a pointer to a data object comprising search preferences;

an algorithm count parameter to specify a desired number of algorithms;

a results array parameter to specify an array to store algorithm identifiers in order of increasing estimated compute time; and

an operation status parameter to indicate if the Get Heuristic API call is successful.

18 . The processor of claim 17 , wherein the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor.

19 . The processor of claim 17 , wherein the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms.

20 . The processor of claim 17 , wherein the data object comprising search preferences indicates a preferred resource utilization.

21 . The processor of claim 17 , wherein the algorithm count parameter includes an integer value of the desired number.

22 . The processor of claim 17 , wherein a machine-readable medium further stores thereon a matrix multiply API to perform an algorithm indicated by the Get Heuristic API call.

23 . The processor of claim 17 , wherein a machine-readable medium further stores thereon a matrix multiply API to compute a matrix multiplication of matrices, wherein the matrix multiply API includes parameters comprising:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API.

24 . The processor of claim 17 , wherein:

the pointer to the matrix multiplication operation description is a pointer to a matrix multiply operation descriptor;

the data object comprising search preferences indicates a search algorithm to utilize to search for the possible algorithms;

the data object comprising search preferences indicates a preferred resource utilization;

the algorithm count parameter includes an integer value of the desired number;

a machine-readable medium further stores thereon a matrix multiply API to perform an algorithm indicated by the Get Heuristic API call, wherein the matrix multiply API includes parameters comprising:

an operation description parameter comprising a pointer to a matrix multiply operation descriptor;

an input scalars parameter comprising pointers to data objects comprising values of input scalars;

an input matrices parameter comprising pointers to values of the input matrices;

a matrix layout descriptor parameter comprising pointers to matrix layout descriptors;

an output location parameter comprising a pointer to a location in which a result of the matrix multiplication is to be stored;

an algorithm parameter including a pointer to a data object that comprises a particular algorithm to be utilized in the matrix multiplication operation; and

an operation status parameter to indicate a status of the matrix multiply API.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2023
From: MAJCHER, PIOTR; HAGOG, MOSTAFA; VANDERMERSCH, PHILIPPE
To: NVIDIA CORPORATION
Reel/Frame 065625/0334 →
Continuity (2)
Continuation 16795380 · Feb 19, 2020
Related Publication 20240086491A1 · Mar 14, 2024
References Cited (79)
US 7002591B1 · Leather et al. · 2006 [cited by applicant]
US 7307638B2 · Leather et al. · 2007 [cited by applicant]
US 9304835B1 · Ekanadham et al. · 2016 [cited by applicant]
US 9400700B2 · Ekanadham et al. · 2016 [cited by applicant]
US 9772890B2 · Ekanadham et al. · 2017 [cited by applicant]
US 9778967B2 · Ekanadham et al. · 2017 [cited by applicant]
US 10067910B2 · Zhou · 2018 [cited by applicant]
US 10073815B2 · Zhou · 2018 [cited by applicant]
US 12020076B2 · Merrill, III · 2024 [cited by applicant]
US 20050237337A1 · Leather et al. · 2005 [cited by applicant]
US 20140289445A1 · Savich · 2014 [cited by applicant]
US 20160188385A1 · Ekanadham et al. · 2016 [cited by applicant]
US 20170344514A1 · Zhou · 2017 [cited by applicant]
US 20180004709A1 · Zhou · 2018 [cited by applicant]
US 20180157471A1 · Venkataramani et al. · 2018 [cited by applicant]
US 20180189234A1 · Nurvitadhi et al. · 2018 [cited by applicant]
US 20180189239A1 · Nurvitadhi et al. · 2018 [cited by applicant]
US 20180189638A1 · Nurvitadhi et al. · 2018 [cited by applicant]
US 20180189675A1 · Nurvitadhi et al. · 2018 [cited by applicant]
US 20180293777A1 · Sarel et al. · 2018 [cited by applicant]
US 20190114538A1 · Ng et al. · 2019 [cited by applicant]
US 20190278593A1 · Elango et al. · 2019 [cited by applicant]
US 20190362197A1 · Jain · 2019 [cited by applicant]
US 20200133735A1 · Zhao et al. · 2020 [cited by applicant]
US 20210048991A1 · Tanner · 2021 [cited by applicant]
US 20210110506A1 · Prakash et al. · 2021 [cited by applicant]
US 20210192334A1 · Barker et al. · 2021 [cited by applicant]
US 20220365750A1 · Bharambe · 2022 [cited by examiner]
US 20240161222A1 · Edwards · 2024 [cited by examiner]
US 20240161223A1 · Edwards · 2024 [cited by examiner]
US 20240168765A1 · Edwards · 2024 [cited by examiner]
US 20240168829A1 · Edwards · 2024 [cited by examiner]
US 20240168831A1 · Edwards · 2024 [cited by examiner]
US 20240169469A1 · Edwards · 2024 [cited by examiner]
US 20250190283A1 · Ligowski · 2025 [cited by examiner]
CN 109144471A · 2019 [cited by applicant]
CN 109460533A · 2019 [cited by applicant]
CN 113240570A · 2021 [cited by applicant]
EP 3343383A1 · 2018 [cited by applicant]
EP 3343390A1 · 2018 [cited by applicant]
EP 3343391A1 · 2018 [cited by applicant]
EP 3343392A1 · 2018 [cited by applicant]
EP 3343460A1 · 2018 [cited by applicant]
WO 2018125250A1 · 2018 [cited by applicant]
WO 2019027924A1 · 2019 [cited by applicant]
WO 2019085655A1 · 2019 [cited by applicant]
WO 2020046859A1 · 2020 [cited by applicant]
WO 2020050886A1 · 2020 [cited by applicant]
WO 2021076425A1 · 2021 [cited by applicant]
Junr_0926, “cuBLAS Level-2 Function,” retrieved from <https://www.jianshu.com/p/0ee1134a528b,> Nov. 10, 2018, 5 pages. [cited by applicant]
Office Action for Chinese Application No. 202110191400.5, mailed Jul. 9, 2024, 31 pages. [cited by applicant]
Office Action for Chinese Application No. 202111061790.0, mailed Aug. 21, 2024, 33 pages. [cited by applicant]
United Kingdom Combined Search and Examination Report for Application No. GB2102376.7, mailed Sep. 13, 2024, 7 pages. [cited by applicant]
United Kingdom Combined Search and Examination Report for Application No. GB2112943.2, mailed Sep. 13, 2024, 7 pages. [cited by applicant]
“Guide and Reference” retrieved from cenapad.unicamp.br, archived on Jan. 14, 2016, 33 pages. [cited by applicant]
“Guide and Reference” retrieved from cenapad.unicamp.br, archived on Oct. 27, 2007, 173 pages. [cited by applicant]
Bientinesi et al., “Representing Linear Algebra Algorithms in Code: The Flame Application Program Interfaces,” ACM Transactions on Mathematical Software, 31(1): Mar. 2005, 33 pages. [cited by applicant]
Goto et al., “Anatomy of High-Performance Matrix Multiplication,” ACM Transactions on Mathematical Software, 34 (3): May 2008, 25 pages. [cited by applicant]
IEEE, “IEEE Standard 754-2008 (Revision of IEEE Standard 754-1985): IEEE Standard for Floating-Point Arithmetic,” Aug. 29, 2008, 70 pages. [cited by applicant]
NVIDIA, “Matrix Multiply (GEMM),” 2021, 1 page. [cited by applicant]
Office Action for United Kingdom Application No. GB2102376.7, mailed Dec. 11, 2023, 5 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2102376.7, mailed Jun. 14, 2023, 4 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2102376.7, mailed Nov. 10, 2022, 4 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2112943.2, mailed Dec. 11, 2023, 4 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2112943.2, mailed Jun. 14, 2023, 4 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2112943.2, mailed Nov. 10, 2022, 4 pages. [cited by applicant]
Notice of Intention to Grant for United Kingdom Application No. GB2102376.7, mailed Oct. 15, 2024, 2 pages. [cited by applicant]
Notice of Intention to Grant for United Kingdom Application No. GB2112943.2, mailed Dec. 23, 2024, 2 pages. [cited by applicant]
Office Action for Chinese Application No. 202110191400.5, mailed Jan. 14, 2025, 33 pages. [cited by applicant]
Wang et al., “Collaborative Transparent Programming Model of Software and Hardware for Self-Reconfigurable Systems,” Science and Technology Information, Aug. 5, 2011, 4 pages. [cited by applicant]
Brubaker, Ben, “AI Reveals New Possibilities in Matrix Multiplication” Nov. 23, 2022, 18 pages. [cited by applicant]
Decision on Rejection for Chinese Application No. 20211106179.0, mailed Apr. 10, 2025, 10 pages. [cited by applicant]
Fawzi et al., “Discovering Faster Martix Multiplication Algorithms with Reinforcement Learning”, Oct. 5, 2022, 17 pages. [cited by applicant]
Gorman, “Sorting A Vector in C++,” retrieved from http://www.gormanalysis.com/blog/sorting-a-vector-in-cpp/, Mar. 7, 2019, 4 pages. [cited by applicant]
Johansson et al., “Algorithms for Large Matrix Multiplications—Assessment of Strassen's Algorithm,” KTH Royal Institute of Technology School of Engineering Sciences, 2018, 41 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2102376.7, mailed May 8, 2024, 9 pages. [cited by applicant]
Office Action for United Kingdom Application No. GB2112943.2, mailed May 8, 2024, 8 pages. [cited by applicant]
Office Action for Chinese Application No. 202110191400.5 mailed Feb. 6, 2024, 19 pages. [cited by applicant]
Zhang et al., “Software Architecture for Modular Self-Reconfigurable Robots,” 2011, 6 pages. [cited by applicant]