# 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.

- URL: https://dmxsf.com/en/blog/flashattention-3-fast-and-accurate-attention-with-asynchrony-and-low-precision/
- [DMXSF](https://dmxsf.com/en/about/)
- Published: 2024-07-21
- Updated: 2026-11-13
- Paper notes
- Paper: [FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision](https://arxiv.org/abs/2407.08608) (Jay Shah, Ganesh Bikshandi, Ying Zhang, et al. · arXiv, 2024)

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.

```python
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)
```

```text
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

- [FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision](https://arxiv.org/abs/2407.08608)
- [FlashAttention-2](https://dmxsf.com/en/blog/flashattention-2-faster-attention-with-better-parallelism-and-work-partitioning/)
- [Quantization basics](https://dmxsf.com/en/wiki/inference/quantization/)

## 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.
