FlashAttention & GPU Architecture
GPU HBM vs SRAM bandwidth, online softmax tiling, IO-awareness, and Triton CUDA ops.
For a small example, four query vectors attend to four key vectors. Compute one block at a time, maintain online softmax statistics, and reproduce the same output without storing all 16 scores.