You already know: cache lines and locality on CPUs (D1 C++ & memory); registers, shared memory, L2 and HBM sizes (GPU architecture); thread indexing and the naive transpose that reads well and writes badly (CUDA programming model); FlashAttention's tiles in SRAM (D12 Advanced optimization).
Why this matters for Atlas. Most kernels in an LLM are memory-bound, so the memory system decides their speed. Three rules cover most of it: make a warp's accesses to global memory coalesced (adjacent threads, adjacent addresses), reuse data from fast on-chip memory (registers and shared memory) instead of re-reading HBM, and lay out shared memory to avoid bank conflicts. This lesson quantifies each rule with simulations of the hardware's actual behaviour and builds the tiled transpose that fixes the previous lesson's slow writes.
1. The hierarchy, and what each level is for
The question. Where should a kernel keep its data?
Start from nothing. Each level trades size for speed and scope: