---
title: "FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scaling"
description: "FlashAttention-4 is an attention kernel co-designed for Blackwell GPUs, where tensor core throughput grew much faster than the exponential (SFU) units and shared memory bandwidth."
url: "https://swe.quest/articles/flashattention-4-algorithm-and-kernel-pipelining-co-design-for-asymmetric-67fe95e5005d9861"
canonical: "https://www.together.ai/blog/flashattention-4"
source: "Together AI"
published: "2026-03-05"
difficulty: "hard"
kind: "Research"
reading_minutes: 11
tags: ["inference","performance","hardware","model-training","llms"]
---

# FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scaling

A post on [Together AI](https://swe.quest/sources/together.md), published 2026-03-05, 11 min read, Research. Original: [https://www.together.ai/blog/flashattention-4](https://www.together.ai/blog/flashattention-4)

## Summary

FlashAttention-4 is an attention kernel co-designed for Blackwell GPUs, where tensor core throughput grew much faster than the exponential (SFU) units and shared memory bandwidth. A feeds-and-speeds analysis shows the forward pass is bottlenecked by softmax exponentials and the backward pass by shared memory traffic, not by MMA speed. The forward pass addresses this with ping-pong Q tiles, a dedicated correction warpgroup, conditional online-softmax rescaling, and exp2 computed partly in software through Cody-Waite range reduction and a cubic polynomial on FMA units. The backward pass keeps intermediates in tensor memory, uses 2-CTA MMA with a DSMEM exchange of dS to cut shared memory traffic and halve dQ atomics, and adds an LPT tile scheduler and a deterministic mode. On B200 with BF16 it reaches up to 1605 TFLOPs/s (71% utilization), up to 1.3× faster than cuDNN 9.13 and 2.7× faster than Triton, and is written in CuTe-DSL.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- GPU kernel programming ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- FlashAttention online softmax
- tensor cores and GEMM tiling
- CUDA memory hierarchy

## Keywords

FlashAttention-4, NVIDIA Blackwell, B200, CuTe-DSL, CUTLASS, tensor memory, cuDNN, Triton

## Related posts

- [We reverse-engineered Flash Attention 4](https://swe.quest/articles/we-reverse-engineered-flash-attention-4-e0ddc41706e090a5.md): Modal · 2025-09-26 · Hard · 18 min read · Inference & serving, Hardware, Performance engineering, Concurrency, LLMs
  Flash Attention 4, Tri Dao's attention kernel for Nvidia Blackwell GPUs, reportedly runs about 20% faster than cuDNN's closed-source attention kernels.
- [Making FlashAttention-4 faster for inference](https://swe.quest/articles/making-flashattention-4-faster-for-inference-dc917e70c20e0f22.md): Modal · 2026-06-11 · Hard · 14 min read · Inference & serving, Hardware, Performance engineering, LLMs
  Modal engineers extended the FlashAttention-4 kernel for decode-heavy LLM inference on Blackwell GPUs through two kinds of change: new parallelism strategies, such as split-KV parallelism across the key/value dimension, and support for irregular memory access via cp.async in place of TMA bulk loads.
- [Key research and product announcements at the AI Native Conf](https://swe.quest/articles/key-research-and-product-announcements-at-the-ai-native-conf-07f3b657efde83f0.md): Together AI · 2026-03-05 · Hard · 7 min read · Inference & serving, Hardware, Model training, AI agents, Performance engineering
  Together AI announced seven research and product releases spanning GPU kernels, reinforcement learning infrastructure and inference optimization.
- [Profiling in PyTorch (Part 3): Attention is all you profile](https://swe.quest/articles/profiling-in-pytorch-part-3-attention-is-all-you-profile-44c4f73b7586bec2.md): Hugging Face · 2026-07-10 · Medium · 21 min read · Performance engineering, Inference & serving, Python, Hardware, LLMs
  Profiling attention variants in PyTorch on an A100 shows how each implementation appears in profiler traces.
- [Learn the Hugging Face Kernel Hub in 5 Minutes](https://swe.quest/articles/learn-the-hugging-face-kernel-hub-in-5-minutes-049114b1e85677a7.md): Hugging Face · 2025-06-12 · Medium · 13 min read · Inference & serving, Performance engineering, Python, Hardware
  Hugging Face's Kernel Hub and \`kernels\` library let PyTorch code download pre-compiled, optimized GPU kernels such as FlashAttention, activations, RMSNorm and quantization kernels with a single \`get\_kernel\` call.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
