flashattention
Inference interview questions tagged flashattention, across every topic.
8 questions · 4 unlocked for you
Concepts behind "flashattention"
Concept pages for the mechanisms these questions lean on.
Foundational
The Online Softmax RecurrenceOnline softmax keeps a running max, a running normalizer and an unnormalized output, and rescales them when the max grows. The merge rule is exact and associative, which is what lets FlashAttention tile over keys and Flash-Decoding split one long context across thread blocks.🔦 Attention Kernels
Advanced
FlashAttention 1 to 4: What Each Generation ChangedEvery FlashAttention generation computes the same exact attention and attacks a different bottleneck: HBM traffic in FA1, poor work partitioning in FA2, Hopper's asynchronous tensor cores in FA3, and Blackwell's slow exponential units in FA4. Knowing which bottleneck each one removed tells you which kernel a given GPU should run.🔦 Attention Kernels🔒 Premium