IP Library › Granted Patent US 12,204,898
Granted Patent B2
US 12,204,898 · App. 18/240,287 · Granted Jan 21, 2025

Interruptible and restartable matrix multiplication instructions, processors, methods, and systems

Inventors: Edward T. Grochowski (San Jose, CA); Asit K. Mishra (Hillsboro, OR); Robert Valentine (Kiryat Tivon, IL); Mark J. Charney (Lexington, MA); Simon C. Steely, Jr. (Hudson, NH)
Assignee: Intel Corporation
G06F9/3001G06F9/30036G06F9/30038G06F9/30145G06F9/3861G06F9/3865
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,204,898
App. No.
18/240,287
Granted
Jan 21, 2025
Kind
B2
Abstract

A processor of an aspect includes a decode unit to decode a matrix multiplication instruction. The matrix multiplication instruction is to indicate a first memory location of a first source matrix, is to indicate a second memory location of a second source matrix, and is to indicate a third memory location where a result matrix is to be stored. The processor also includes an execution unit coupled with the decode unit. The execution unit, in response to the matrix multiplication instruction, is to multiply a portion of the first and second source matrices prior to an interruption, and store a completion progress indicator in response to the interruption. The completion progress indicator to indicate an amount of progress in multiplying the first and second source matrices, and storing corresponding result data to the third memory location, that is to have been completed prior to the interruption.

Claims (49)

1. A processor comprising:

a decoder to decode a matrix multiplication instruction having a first field associated with a first source matrix, a second field associated with a second source matrix, a destination field, and an opcode to identify the matrix multiplication instruction; and

an execution unit coupled to the decoder, the execution unit to perform operations in response to the matrix multiplication instruction, the operations including:

partitioning the first source matrix into a first plurality of tiles, each tile in the first plurality of tiles comprising a specified number of non-overlapping data elements, and

partitioning the second source matrix into a second plurality of tiles, each tile in the second plurality of tiles comprising a specified number of non-overlapping data elements,

the execution unit comprising a fused matrix multiplication and addition logic to perform parallel fused multiply-accumulate operations using data elements from a first tile of the first plurality of tiles and data elements from a second tile of the second plurality of tiles,

at least one of the parallel fused multiply-accumulate operations is to:

multiply data elements from the first tile and corresponding data elements from the second tile to generate a plurality of products, and add one or more of the plurality of products to a corresponding data element from an accumulation matrix to generate a corresponding result value in a result matrix.

2. The processor of claim 1 , wherein the first field is to indicate a location for the first source matrix, the second field is to indicate a location for the second source matrix, and the destination field is to indicate a location for the result matrix.

3. The processor of claim 1 , wherein the opcode corresponds to a size of the first source matrix, the second source matrix, and the result matrix.

4. The processor of claim 1 , wherein the fused matrix multiplication and addition logic comprises:

a plurality of multipliers, each multiplier to multiply one of the data elements from the first tile and one of the data elements from the second tile to generate one of the plurality of products, and

a plurality of adders, each adder to add one or more products of the plurality of products to the corresponding data element from the accumulation matrix to generate the corresponding result value in the result matrix.

5. The processor of claim 4 , wherein the decoder is to output a plurality of micro-operations or control signals responsive to the matrix multiplication instruction, a first plurality of the micro-operations or control signals indicating the multiplications to be performed by the plurality of multipliers.

6. The processor of claim 4 , wherein a size of the first tile and a size of the second tile are based on a number of the plurality of multipliers.

7. The processor of claim 4 , wherein the plurality of multipliers comprise a number of multipliers to optimize processing tiles of one or more predetermined sizes.

8. The processor of claim 7 , wherein the one or more predetermined sizes comprises tiles with 16 rows and 16 columns, tiles with 32 rows and 32 columns, or tiles with 64 rows and 64 columns.

9. A method comprising:

decoding a sequence of instructions, the sequence of instructions including a first matrix multiplication instruction having a first field associated with a first source matrix, a second field associated with a second source matrix, a destination field, and an opcode to identify the first matrix multiplication instruction in the sequence of instructions;

performing operations by an execution unit based on one or more instructions in the sequence of instructions;

partitioning, by a matrix multiplication accelerator responsive to the first matrix multiplication instruction, the first source matrix comprising a first plurality of data elements into a first plurality of tiles, each tile in the first plurality of tiles comprising a specified number of non-overlapping data elements from the first plurality of data elements, and to partition the second source matrix comprising a second plurality of data elements into a second plurality of tiles, each tile in the second plurality of tiles comprising a specified number of non-overlapping data elements from the second plurality of data elements;

performing parallel fused multiply-accumulate operations on a fused multiply-accumulate array using data elements from a first tile of the first plurality of tiles and data elements from a second tile of the second plurality of tiles, at least one fused multiply-accumulate operation to:

multiply data elements from the first tile and corresponding data elements from the second tile to generate a plurality of products, and

add one or more of the plurality of products to a corresponding data element from an accumulation matrix to generate a corresponding result value in a first result matrix.

10. The method of claim 9 wherein the first field is usable to identify a location for the first source matrix, the second field is usable to identify a location for the second source matrix, and the destination field is usable to identify a location for the first result matrix.

11. The method of claim 9 wherein the opcode corresponds to a size of the first source matrix, the second source matrix, and the first result matrix.

12. The method of claim 9 , wherein the fused multiply-accumulate array comprises:

a plurality of multipliers, each multiplier to multiply one of the data elements from the first tile and one of the data elements from the second tile to generate one of the plurality of products, and

a plurality of adders, each adder to add the one or more products of the plurality of products to the corresponding data element from the accumulation matrix to generate the corresponding result value in the first result matrix.

13. The method of claim 12 wherein decoding comprises outputting a plurality of micro-operations or control signals responsive to the first matrix multiplication instruction, a first plurality of the micro-operations or control signals indicating the multiplications to be performed by the plurality of multipliers.

14. The method of claim 12 wherein a size of the first tile and a size of the second tile are based on a number of the plurality of multipliers.

15. The method of claim 12 wherein the plurality of multipliers comprise a number of multipliers to optimize processing of tiles of one or more predetermined sizes.

16. The method of claim 15 wherein the one or more predetermined sizes comprises tiles with 16 rows and 16 columns, tiles with 32 rows and 32 columns, or tiles with 64 rows and 64 columns.

17. A non-transitory machine-readable medium having program code stored thereon which, when executed by a machine, causes the machine to perform operations comprising:

decoding a sequence of instructions, the sequence of instructions including a first matrix multiplication instruction having a first field associated with a first source matrix, a second field associated with a second source matrix, a destination field, and an opcode to identify the first matrix multiplication instruction in the sequence of instructions;

performing operations by an execution unit based on one or more instructions in the sequence of instructions;

partitioning, by a matrix multiplication accelerator responsive to the first matrix multiplication instruction, the first source matrix comprising a first plurality of data elements into a first plurality of tiles, each tile in the first plurality of tiles comprising a specified number of non-overlapping data elements from the first plurality of data elements, and to partition the second source matrix comprising a second plurality of data elements into a second plurality of tiles, each tile in the second plurality of tiles comprising a specified number of non-overlapping data elements from the second plurality of data elements;

performing parallel fused multiply-accumulate operations on a fused multiply-accumulate array using data elements from a first tile of the first plurality of tiles and data elements from a second tile of the second plurality of tiles, at least one fused multiply-accumulate operation to:

multiply data elements from the first tile and corresponding data elements from the second tile to generate a plurality of products, and

add one or more of the plurality of products to a corresponding data element from an accumulation matrix to generate a corresponding result value in a first result matrix.

18. The non-transitory machine-readable medium of claim 17 wherein the first field is usable to identify a location for the first source matrix, the second field is usable to identify a location for the second source matrix, and the destination field is usable to identify a location for the first result matrix.

19. The non-transitory machine-readable medium of claim 17 wherein the opcode corresponds to a size of the first source matrix, the second source matrix, and the first result matrix.

20. The non-transitory machine-readable medium of claim 17 , wherein the fused multiply-accumulate array comprises:

a plurality of multipliers, each multiplier to multiply one of the data elements from the first tile and one of the data elements from the second tile to generate one of the plurality of products, and

a plurality of adders, each adder to add the one or more products of the plurality of products to the corresponding data element from the accumulation matrix to generate the corresponding result value in the first result matrix.

21. The non-transitory machine-readable medium of claim 20 wherein decoding comprises outputting a plurality of micro-operations or control signals responsive to the first matrix multiplication instruction, a first plurality of the micro-operations or control signals indicating the multiplications to be performed by the plurality of multipliers.

22. The non-transitory machine-readable medium of claim 20 wherein a size of the first tile and a size of the second tile are based on a number of the plurality of multipliers.

23. The non-transitory machine-readable medium of claim 20 wherein the plurality of multipliers comprise a number of multipliers to optimize processing of tiles of one or more predetermined sizes.

24. The non-transitory machine-readable medium of claim 23 wherein the one or more predetermined sizes comprises tiles with 16 rows and 16 columns, tiles with 32 rows and 32 columns, or tiles with 64 rows and 64 columns.

Continuity (5)
Continuation 18220225 · Jul 10, 2023
Continuation 17362854 · Jun 29, 2021
Continuation 16398200 · Apr 29, 2019
Continuation 15201442 · Jul 2, 2016
Related Publication 20230409318A1 · Dec 21, 2023
References Cited (106)
US 5247632A · Newman · 1993 [cited by applicant]
US 5475822A · Sibigtroth et al. · 1995 [cited by applicant]
US 5475882A · Sereboff · 1995 [cited by applicant]
US 5655096A · Branigin · 1997 [cited by applicant]
US 5892962A · Cloutier · 1999 [cited by applicant]
US 6161219A · Ramkumar et al. · 2000 [cited by applicant]
US 6212112B1 · Naura et al. · 2001 [cited by applicant]
US 6332186B1 · Elwood et al. · 2001 [cited by applicant]
US 6584482B1 · Hansen · 2003 [cited by examiner]
US 6877020B1 · Bratt et al. · 2005 [cited by applicant]
US 7003542B2 · Devir · 2006 [cited by applicant]
US 7209939B2 · Castrapel et al. · 2007 [cited by applicant]
US 7389404B2 · Nair et al. · 2008 [cited by applicant]
US 7725521B2 · Chen et al. · 2010 [cited by applicant]
US 7792895B1 · Juffa et al. · 2010 [cited by applicant]
US 7873812B1 · Mimar · 2011 [cited by applicant]
US 7912889B1 · Juffa · 2011 [cited by examiner]
US 7932910B2 · Hansen et al. · 2011 [cited by applicant]
US 8392487B1 · Mesh et al. · 2013 [cited by applicant]
US 8984043B2 · Ginzburg · 2015 [cited by examiner]
US 9442723B2 · Yang et al. · 2016 [cited by applicant]
US 9600281B2 · Eichenberger et al. · 2017 [cited by applicant]
US 9906359B2 · Gueron · 2018 [cited by applicant]
US 9960907B2 · Gueron · 2018 [cited by applicant]
US 10535114B2 · Bolz · 2020 [cited by applicant]
US 20030126176A1 · Devir · 2003 [cited by applicant]
US 20040111587A1 · Nair · 2004 [cited by examiner]
US 20050193050A1 · Sazegari · 2005 [cited by applicant]
US 20060101245A1 · Nair et al. · 2006 [cited by applicant]
US 20060190517A1 · Guerrero · 2006 [cited by applicant]
US 20070186210A1 · Hussain et al. · 2007 [cited by applicant]
US 20080071851A1 · Zohar et al. · 2008 [cited by applicant]
US 20080140994A1 · Khailany et al. · 2008 [cited by applicant]
US 20080208942A1 · Won et al. · 2008 [cited by applicant]
US 20080222486A1 · Richardson et al. · 2008 [cited by applicant]
US 20090043836A1 · Dupaquis et al. · 2009 [cited by applicant]
US 20090292758A1 · Brokenshire et al. · 2009 [cited by applicant]
US 20090300091A1 · Brokenshire et al. · 2009 [cited by applicant]
US 20090300249A1 · Moyer et al. · 2009 [cited by applicant]
US 20100180100A1 · Lu et al. · 2010 [cited by applicant]
US 20100325187A1 · Juffa et al. · 2010 [cited by applicant]
US 20110153707A1 · Ginzburg et al. · 2011 [cited by applicant]
US 20120079252A1 · Sprangle · 2012 [cited by examiner]
US 20120113133A1 · Shpigelblat · 2012 [cited by applicant]
US 20120137074A1 · Kim et al. · 2012 [cited by applicant]
US 20120254588A1 · Adrian et al. · 2012 [cited by applicant]
US 20120314774A1 · Yang · 2012 [cited by examiner]
US 20130305020A1 · Valentine et al. · 2013 [cited by applicant]
US 20140016774A1 · Wolrich et al. · 2014 [cited by applicant]
US 20140149480A1 · Catanzaro et al. · 2014 [cited by applicant]
US 20140195783A1 · Karthikeyan et al. · 2014 [cited by applicant]
US 20150067302A1 · Gueron · 2015 [cited by applicant]
US 20150138206A1 · Mizell · 2015 [cited by applicant]
US 20150199266A1 · Franchetti et al. · 2015 [cited by applicant]
US 20150277904A1 · Espasa et al. · 2015 [cited by applicant]
US 20160179523A1 · Ould-Ahmed-Vall et al. · 2016 [cited by applicant]
US 20170178276A1 · Akenine-Moller · 2017 [cited by examiner]
US 20170337156A1 · Yadavalli · 2017 [cited by applicant]
US 20180113708A1 · Corbal et al. · 2018 [cited by applicant]
CN 1774709A · 2006 [cited by applicant]
CN 101986264A · 2011 [cited by applicant]
CN 104346318A · 2015 [cited by applicant]
CN 104951278A · 2015 [cited by applicant]
KR 1020110079495A · 2011 [cited by applicant]
TW I322958B · 2010 [cited by applicant]
TW 201118721A · 2011 [cited by applicant]
TW 201342220A · 2013 [cited by applicant]
TW I489380B · 2015 [cited by applicant]
TW 201617959A · 2016 [cited by applicant]
WO 2004053841A2 · 2004 [cited by applicant]
WO 2016003740A1 · 2016 [cited by applicant]
WO 2016105727A1 · 2016 [cited by applicant]
WO 2018125250A1 · 2018 [cited by applicant]
Allowance Decision of Examination, TW App. No. 106117444, Feb. 10, 2022, 3 pages (1 page of English Translation and 2 pages of Original Document). [cited by applicant]
Allowance Decision of Examination, TW App. No. 110139698, Jan. 16, 2023, 3 pages (1 page of English Translation and 2 pages of Original Document). [cited by applicant]
Benson A.R., A Framework for Practical Parallel Fast Matrix Multiplication, 2015, ACM, pp. 42-53. (Year: 2015). [cited by applicant]
Corrected Notice of Allowability, U.S. Appl. No. 15/201,442, Jan. 22, 2019, 5 pages. [cited by applicant]
Corrected Notice of Allowabilityfrom U.S. Appl. No. 15/201,442, Mar. 11, 2019, 6 pages. [cited by applicant]
First Office Action, CN App. No. 201780034999.3, Nov. 28, 2022, 10 pages of Original Document Only. [cited by applicant]
International Preliminary Report on Patentability for Application No. PCT/US2017/036038, Jan. 17, 2019, 14 pages. [cited by applicant]
International Preliminary Report on Patentability, PCT App. No. PCT/US2017/040546, Oct. 3, 2019, 10 pages. [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/US2017/036038, Sep. 5, 2017 , 15 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/040540, Jan. 3, 2018, 14 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/036038, Sep. 5, 2017 , 15 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/040534, Jan. 3, 2018, 11 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/040536, Dec. 20, 2017, 11 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/040537, Dec. 20, 2017, 11 pages. [cited by applicant]
International Search Report and Written Opinion, PCT App. No. PCT/US2017/040546, Jan. 24, 2018, 15 pages. [cited by applicant]
Lahr D., “Timing Matrix Multiplication in SciDB and Setting the Number of Worker Instances in SciDB and Running Matrix Multiplication Piecemeal,” Nov. 13, 2012, 8 pages. [cited by applicant]
Lahr, David L., “Distractions: Timing Matrix Multiplication in SciDB and Setting the Number of Worker Instances in SciDB and Running Matrix Multiplication Piecemeal”, Available Online at <http://dllahr.blogspot.com/2012… [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 15/201,442, May 4, 2018, 11 pages. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 16/398,200, Jul. 28, 2020, 16 pages. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 16/398,200, Jul. 28, 2020, 17 pages. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 17/362,854, Aug. 25, 2022, 13 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 15/201,442, Dec. 14, 2018, 5 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 16/398,200, Feb. 24, 2021, 05 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 17/362,854, Feb. 23, 2023, 11 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 17/362,854, Mar. 29, 2023, 2 pages. [cited by applicant]
Office Action and Search Report, TW App. No. 106117444, Jul. 5, 2021, 13 pages (7 pages of English Translation and 6 pages of Original Document). [cited by applicant]
Office Action and Search Report, TW App. No. 110139698, Jun. 16, 2022, 13 pages (7 pages of English Translation and 6 pages of Original Document). [cited by applicant]
Voronenko et al., “Mechanical Derivation of Fused Multiply-Add Algorithms for Linear Transforms”, IEEE Transactions on Signal Processing, vol. 55, No. 9, Sep. 2007, pp. 4458-4473. [cited by applicant]
Guo, J. et al., Programming with Tiles, 2008, ACM, pp. 111-122. (Year: 2008). [cited by applicant]
Liu, S. et al., Campricon: An Instruction Set Architecture for Neural Networks, 2016, IEEE, pp. 393-405. (Year: 2016). [cited by applicant]
Notice of Allowance, CN App. No. 201780034999.3, Oct. 30, 2023, 04 pages (2 pages of English Translation and 2 pages of Original Document). [cited by applicant]
Notice of Allowance, U.S. Appl. No. 18/220,225, Mar. 18, 2024, 11 pages. [cited by applicant]
Office Action, TW App. No. 112115842 (Nov. 27, 2023, 08 pages (04 pages of English Translation and 04 pages of Original Document). [cited by applicant]