AI inference glossary
Software

FlashAttention

Also known as flash attention kernel, fused attention

In plain English

FlashAttention computes exact attention in fast on-chip memory tiles, avoiding the huge intermediate matrix that made attention slow and memory hungry.

Technical definition

FlashAttention is an attention algorithm that tiles the computation through on-chip SRAM and rescales results incrementally, producing exact attention without materializing the full score matrix in HBM.

Engineering details

Naive attention writes a score matrix that grows with the square of sequence length to main memory and reads it back, so bandwidth rather than arithmetic sets its speed. FlashAttention fuses the whole computation into one kernel that streams blocks of keys and values through on-chip memory, using an online softmax to keep results exact. Successive versions and vendor implementations extend the idea to new hardware generations, head layouts, and inference specific decode paths.

Why it matters

This kernel family is what made long context practical, turning attention from the dominant cost of long sequences into one manageable component. It is also the canonical example of how a single well engineered kernel can shift performance across the entire industry.

How to read it in InferenceX

Every serving engine InferenceX benchmarks relies on fused attention kernels descended from this line, through libraries such as FlashInfer on NVIDIA hardware and AITER on AMD, and kernel improvements there routinely move published curves without any hardware change.