From a Matrix Multiply to a Forward Pass
A Unit That Only Multiplies Small Matrices Is Worth Eight Times, on the Multiplies That Can Feed It
Last timeMultiplying in Tiles
A dedicated unit does a whole four by four matrix product in one step. The published gain is eight times, and a multiply collects it only if memory can keep up.
Tiling moved the multiply off the memory limit and onto the arithmetic limit. Since nearly all of a pass is this one operation, the next move belongs to the builder of the device: make units that do nothing but multiply matrices, and make them much faster at it than a general unit could be.
What one of them does in a step
A general arithmetic unit serves one worker at a time, a multiplication and an addition for one product of one cell. The dedicated unit takes three small tables at once.
- a table of four rows and four columns, taken from a tile of the first table of the multiply
- a four by four table from the matching tile of the second
- the four by four table of running totals so far
- the running totals after this step, all sixteen of them
Each of the sixteen cells of gains four products. That is sixty-four multiplications, each with its addition, in one step of the clock. The vendor's description of the V100 counts upward from there.
The lesson stops here
5 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents