PCD bonus · experiment · self-paced

GPU kernels: a campaign

2 levels playable~45 min + optional GPU timegoal: from 1% to 94% of cuBLAS

The campaign in one paragraph. One problem, multiplying two big matrices on a GPU, and one question: why is the obvious kernel 70 times slower than the best one, and how do you close the gap? Each level is a short story in the shape you want X, you try A, you hit problem 1, you refine to B…, with pauses where you guess the next move before reading it, labs that compute the real numbers, and an optional notebook where you write the kernel and time it on your own GPU. Later levels reuse what earlier ones taught; that is the review, no flashcards.

How to play

Read a level at your own pace. When you meet a Your move box, think before opening it. Make the predictions: being wrong is the point, it is what makes the answer stick. The notebook is a side quest, not a gate. Your predictions, explanations and scores stay in this browser.

Levels

ready

1 · The 1% kernel

One thread per output, 1.3% of cuBLAS. Warps, memory sectors, and a two-letter fix worth 6x. Earns: threads and grids, warps, coalescing.

ready

2 · Stop fetching the same numbers

Tiles in shared memory, a race you can trigger, bank conflicts through the level-1 lens, and a twist: 32x less traffic, 1.5x faster. Earns: roofline, shared memory, barriers, banks.

not built yet

3 · More work per thread

Register blocking: 12.8% to 36.5% of cuBLAS.

not built yet

4 · A tile per thread

2D blocking: to 68.7%.

not built yet

5 · Wider loads, tuned tiles

Vectorised access and autotuning: to 84.8%.

not built yet

6 · Think in warps

Warp tiling: 93.7% of cuBLAS.

Mechanics earned

The ladder

Grey is Simon Boehm's climb on an RTX A6000; blue is yours, as a percentage of cuBLAS on your own GPU, once you paste a score line from the notebook.