Basis Lab

How a program runs

Predict from the shape of a piece of work whether a GPU will beat a processor on it and by roughly how much, well enough to say which of the machine's published numbers sets the limit and to recognise the work a GPU will lose on

Why a GPU Is Built This Way

A GPU is not a faster processor. It is a different answer to the question of what to spend a chip on. This course derives that answer, what it costs, and how to tell in advance which kind of work it suits.

8 lessons, written and corrected before you arrived. Reading them here needs no account. The first reads the whole way through; the others open and then stop, because a page nobody owns cannot tell who is reading it. Starting the course gives you your own copy, where every idea has problems standing under it and you can ask about any sentence.

Start reading

  1. 01The Same Chip Buys One Worker at Speed Four or Sixteen at Speed OneA chip is a fixed budget. Spent on one stream of instructions it buys a little speed at a high price. Spent on plain workers it buys output, on the right job.
  2. 02Why a Machine Can Be Four Times Slower and Four Times Faster at Onceopening onlyThe time one item takes and the rate at which items finish are separate numbers. A GPU gives up the first to buy the second, and a job needs enough items to notice.
  3. 03Five Seconds That Will Not Divide Cap a Thousand Workers at Twenty Timesopening onlySome work divides among workers and some cannot. The part that cannot sets a ceiling on any number of workers, and slow workers reach that ceiling from a worse start.
  4. 04Thirty-Two Workers Share One Stream of Instructions, and One Dissenter Stalls Them Allopening onlyA GPU's workers are cheap because a group of them shares one stream of instructions. The price is paid at every decision the members of a group do not agree on.
  5. 05How a GPU Stays Busy While Every One of Its Workers Is Waiting for Memoryopening onlyA processor spends chip making each wait for memory short. A GPU leaves the wait long and keeps enough other groups ready that something can always run.
  6. 06How Big a Job Must Be Before Sending It to the GPU Pays for the Journeyopening onlyA GPU has its own memory, reached over a link slower than either memory. The journey sets a job size below which the device loses however fast it computes.
  7. 07Three Numbers on a GPU Data Sheet and How to Tell Which One Limits Your Jobopening onlyA data sheet gives a memory size, a memory rate and an arithmetic rate. Dividing two of them gives the figure that says which one a given job will run into first.
  8. 08Four Kinds of Job a GPU Does Worse Than the Processor Beside Itopening onlyA GPU loses on jobs that are too small, that will not split, whose neighbouring items take different paths, or that have a deadline on one item. Each follows from how it is built.