Basis Lab

Memory Is the Limit on a GPU

Use a Value Many Times While It Is Near and the Memory Stops Being the Limit

Last timeLaying Data Out for Many Readers

A job's operations per byte rise when each value fetched is used more than once before it is let go: by one worker, by a whole block of workers, or by many items at once.

Lessons five and six made sure no fetched byte is wasted. That gets a job down to its floor. To go lower the job has to move fewer bytes for the same arithmetic, which means raising the ratio from lesson three.

Uses per byte

Split the ratio into what it is made of.

FIG 1A job's operations per byte, taken apart
the job's operations per byte moved
operations done each time a value is used
uses each value gets for one trip from the device's memory
bytes moved for one trip of one value
The problem fixes a and s. The program fixes u. A value used once per trip gives the lowest ratio the job can have, and every extra use per trip raises it in proportion.

Lesson four listed the places a value can wait between uses. Each gives a way to raise uu.

The lesson stops here

6 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 contents

This 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

The rest of this course

  1. 01Add Up the Largest Moment, Not the Average
  2. 02The Fastest a Job Can Run Is Its Bytes Divided by the Bandwidthopening only
  3. 03One Division Says Whether Faster Arithmetic Would Helpopening only
  4. 04Where a Byte Is Kept Decides What It Costs to Readopening only
  5. 05A Group That Reads Next-Door Addresses Wastes Nothingopening only
  6. 06Store Each Field in Its Own Array and the Group Reads Next-Door Bytesopening only
  7. 07Use a Value Many Times While It Is Near and the Memory Stops Being the Limityou are here
  8. 08Four Ways to Fit, and What Each One Costsopening only

Read alongside