IP Library Granted Patent US 11,048,508
Granted Patent B2
US 11,048,508 · App. 16/398,200 · Granted Jun 29, 2021

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/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 11,048,508
App. No.
16/398,200
Granted
Jun 29, 2021
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 (46)

1. A processor comprising:

a decode unit to decode a matrix multiplication instruction, the matrix multiplication instruction to indicate a first memory location of a first source matrix, to indicate a second memory location of a second source matrix, and to indicate a third memory location where a result matrix is to be stored; and

an execution unit coupled with the decode unit, the execution unit, in response to the matrix multiplication instruction, to:

break each of the first source matrix, the second source matrix, and an accumulation matrix, which is initially to be stored in the third memory location, into a plurality of tiles; and

use the tiles to multiply the first and second source matrices.

2. The processor of claim 1 , wherein the execution unit, in response to the matrix multiplication instruction, is to break the first source matrix into a plurality of tiles of a first size, and is to break at least one tile of the first size into a plurality of tiles of a second size that is smaller than the first size.

3. The processor of claim 1 , wherein the execution unit, in response to the matrix multiplication instruction, is to store at least two copies of at least one tile in a cache.

4. The processor of claim 1 , wherein the execution unit, in response to the matrix multiplication instruction, is to:

store two copies of the tiles from the first and second source matrices in the cache; and

store three copies of the tiles from the accumulation matrix in the cache.

5. The processor of claim 1 , wherein the execution unit, in response to the matrix multiplication instruction, is to:

determine whether a given tile is a full tile or a partial tile;

perform relatively more concurrent multiplications when the given tile is the full tile; or

perform relatively less concurrent multiplications when the given tile is the partial tile.

6. The processor of claim 1 , wherein the decode unit is to decode the matrix multiplication instruction that is to indicate matrices dimension indicators.

7. The processor of claim 1 , wherein the decode unit is to decode the matrix multiplication instruction that is to indicate a number of rows of the first source matrix, a number of columns of the second source matrix, and at least one of: (a) a number of columns of the first source matrix; and (b) a number of rows of the second source matrix.

8. A processor comprising:

a decode unit to decode a matrix multiplication instruction, the matrix multiplication instruction to indicate a first location of a first source matrix, to indicate a second location of a second source matrix, and to indicate a third location where a result matrix is to be stored, wherein a number of rows is to be specified for the first source matrix, a number of columns is to be specified for the second source matrix, and either a number of columns is to be specified for the first source matrix or a number of rows is to specified for the second source matrix; and

an execution unit coupled with the decode unit, the execution unit, in response to the matrix multiplication instruction, to:

start a multiplication of the first and second source matrices;

interrupt the multiplication of the first and second source matrices due to an interruption; and

restart the multiplication of the first and second source matrices after the interruption using results determined prior to the interruption.

9. The processor of claim 8 , wherein the first source matrix, the second source matrix, and the result matrix are each to be stored in memory in a column major format, and wherein the decode unit is to decode the matrix multiplication instruction that is to indicate a distance between columns of a larger matrix that is to include the first source matrix, a distance between columns of a larger matrix that is to include the second source matrix, and a distance between columns of a larger matrix that is to include the result matrix.

10. The processor of claim 8 , wherein the first source matrix, the second source matrix, and the result matrix are each to be stored in memory in a row major format, and wherein the decode unit is to decode the matrix multiplication instruction that is to indicate a distance between rows of a larger matrix that is to include the first source matrix, a distance between rows of a larger matrix that is to include the second source matrix, and a distance between rows of a larger matrix that is to include the result matrix.

11. The processor of claim 8 , wherein the execution unit, in response to the matrix multiplication instruction, is to add a portion of an accumulation matrix, which is initially to be stored in the third location, to a result of the multiplication of the first and second source matrices.

12. The processor of claim 8 , wherein the processor is to introduce operations into a front end portion of a pipeline of the processor based on a size of the first and second source matrices.

13. The processor of claim 8 , wherein the execution unit, in response to the matrix multiplication instruction, is to break the first source matrix into a plurality of tiles.

14. The processor of claim 13 , wherein the execution unit, in response to the matrix multiplication instruction, is to break the first source matrix into a plurality of tiles of a first size, and is to break at least one tile of the first size into a plurality of tiles of a second size that is smaller than the first size.

15. The processor of claim 13 , wherein the execution unit, in response to the matrix multiplication instruction, is to store at least two copies of at least one of the tiles in a cache.

16. A processor comprising:

a fetch unit to fetch a matrix multiplication instruction, the matrix multiplication instruction to indicate a first location of a first source matrix, to indicate a second location of a second source matrix, and to indicate a third location where a result matrix is to be stored; and

matrix multiplication circuitry coupled with the fetch unit, the matrix multiplication circuitry, when an interruption occurs while performing the matrix multiplication instruction, to:

store an indication of an amount of progress in multiplying the first and second source matrices; and

storing partially completed result data.

17. The processor of claim 16 , wherein the first, second, and third locations are memory locations, and wherein the matrix multiplication circuitry, as part of performing the matrix multiplication instruction, is to break the first source matrix into a plurality of tiles.

18. The processor of claim 16 , wherein the matrix multiplication circuitry, as part of performing the matrix multiplication instruction, is to:

determine whether a given tile is a full tile or a partial tile;

perform relatively more concurrent multiplications when the given tile is the full tile; or

perform relatively less concurrent multiplications when the given tile is the partial tile.

19. The processor of claim 16 , wherein the matrix multiplication circuitry, upon resuming the matrix multiplication instruction after the interruption, is to use the indication of the amount of progress to resume multiplication of the first and second source matrices, without repeating multiplying a portion of the first and second source matrices that had already been multiplied prior to the interruption.

20. The processor of claim 16 , wherein the fetch unit is to fetch the matrix multiplication instruction that is to indicate a number of rows of the first source matrix, a number of columns of the second source matrix, and at least one of: (a) a number of columns of the first source matrix; and (b) a number of rows of the second source matrix.

21. The processor of claim 16 , wherein the fetch unit is to fetch the matrix multiplication instruction that is to have an immediate to indicate a size of each of the first and second source matrices, and wherein the processor is to introduce operations into a front end portion of a pipeline of the processor based on the indicated size of each of the first and second source matrices.

22. The processor of claim 16 , wherein the matrix multiplication circuitry, upon resuming the matrix multiplication instruction after the interruption, is to:

start to perform the matrix multiplication instruction speculatively with an assumption that the amount of prior progress is none; and

cause a micro-exception when the indication of the amount of progress is not none.

23. The processor of claim 16 , further comprising a general-purpose register, and wherein the matrix multiplication circuitry is to store the indication of the amount of progress in the general-purpose register, and wherein the matrix multiplication circuitry is to store the indication of the amount of progress which is not to be architecturally defined.

Continuity (2)
Continuation 15201442 · Jul 2, 2016
Related Publication 20190258481A1 · Aug 22, 2019