FlashAttention-3: Asynchrony and low precision on Hopper
FlashAttention-3 uses warp specialization to overlap GEMMs with softmax on Hopper and adds block-quantized FP8 for higher throughput, while retaining an exact FP16 path.
On this page
FlashAttention-3 targets H100 asynchronous instructions and Tensor Cores, organizing data movement, matrix operations and softmax into producer-consumer pipelines.
How it works
Warp specialization assigns distinct roles, pingpong scheduling overlaps GEMM and softmax from separate task groups, and intra-warpgroup pipelining hides latency. Block quantization and incoherent processing control FP8 error.
What the evidence shows
The paper reports about 740 TFLOP/s for FP16 and nearly 1.2 PFLOP/s for FP8 on H100 in its settings. These gains rely on Hopper features and do not transfer unchanged to older GPUs.
A reproducible check
This snippet checks a public formula or configuration; it does not reproduce full training.
fp16_tflops, fp8_tflops = 740, 1200
print("reported FP16 TFLOP/s =", fp16_tflops)
print("reported FP8 TFLOP/s =", fp8_tflops)
print("throughput ratio =", fp8_tflops/fp16_tflops)
reported FP16 TFLOP/s = 740
reported FP8 TFLOP/s = 1200
throughput ratio = 1.6216216216216217
The arithmetic is reproducible, but model quality still depends on the full experiments in the paper.
Limitations and common misreadings
FP8 is a numerical approximation, unlike exact FP16 attention, and requires careful scaling. Asynchronous schedules are hardware-specific and complex.
The key takeaway
The third generation co-designs the algorithm with asynchronous execution and numerical formats rather than optimizing arithmetic alone.
Further reading
FAQ
- Which hardware does it target?
- NVIDIA Hopper, especially H100 asynchronous execution and Tensor Cores.
- How is FP8 error controlled?
- Block quantization and numerical processing reduce outlier and rounding errors.
- Are both paths exact attention?
- FP16 uses the exact algorithm; FP8 introduces low-precision numerical approximation.