FlashAttention-2 work partitioning: fixing warp-level underutilization
Fields
flops/flashattention-2-work-partitioningNotes
FA-1 reached only 25-40% of peak FLOPS/s according to the existing prefill-attention record's source chain; FA-2's stated target was roughly 2x and the changelog calls it 'Complete rewrite, 2x faster' (author claim, 2.0). Where FA-2 does NOT apply: it is Ampere-and-later only (README: Ampere, Ada or Hopper for the CUDA path, Turing via a separate repo with a feature subset), and on ROCm it ships two different backends (composable_kernel as default, plus a Triton/aiter backend) with different GPU support lists (MI200x/MI250x/MI300x/MI355x and RDNA 3/4 for the CK backend). That is the first place the same model gets different kernels per arch. Inference-relevant additions: 2.2 splits the KV-cache load across thread blocks for tiny query lengths with a separate combine kernel, 2.5 added paged KV cache, 2.6 softcapping for Gemma-2/Grok.
HARDWARE-PARAMETER ROWS ADDED 2026-10-05 (schema authority pass, agent w5-schema). `affected_by_hardware` names PRODUCTS (accelerator record ids); these rows name the hardware QUANTITIES that move this class's cost, which had nowhere to live until flop.hardware_parameters was added in this commit. Every effect below is lifted verbatim from this record's own existing prose and no figure here is new - `magnitude` reproduces numbers the record already quoted. `basis` is 'unverified' where the effect was asserted with nothing concrete behind it, rather than being dressed up. The rows were pulled out of free-text notes; they are not a change to what this record claims.