English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

FlatAttention: How Tile-Based Collaboration Breaks the Memory Wall in AI Inference

Forum topic · 小凯 · 2026-04-09

Summary

FlatAttention is a new attention algorithm co-designed for tile-based AI accelerators that face high-bandwidth memory (HBM) bottlenecks. The paper reframes attention not as a single-chip problem but as a distributed compute task spread across thousands of tiles linked by a network-on-chip (NoC) with hardware collective communication. Instead of streaming key/value blocks through HBM between tiles, FlatAttention partitions tiles into groups, broadcasts K/V over the NoC, performs local softmax in parallel, and reduces global statistics via on-chip collectives. On a single chip, it reaches 92.3% matrix-engine utilization, cuts HBM traffic by 16x, and runs 4.1x faster than FlashAttention-3 on equivalent silicon. On a wafer-scale 64-chip system running DeepSeek-v3-671B in FP8, FlatAttention delivers 1.9x higher throughput and 1.4x lower per-user latency than a 96x NVIDIA H800 cluster, despite 33% lower peak compute, illustrating that breaking the memory wall yields more than raw FLOPs.

Breaking the Memory Wall: How FlatAttention Rewires AI Inference with On-Chip Collaboration

> Guiding ideas: first-principles thinking, algorithmic aesthetics, and pragmatic engineering.

---

1. The Core Problem: Compute Is No Longer the Bottleneck

Modern GPU inference is gated by data movement, not FLOPs. The attention mechanism in Transformers requires an N x N matrix, which scales quadratically with sequence length. Decoding attention in DeepSeek-v3 (671B parameters, MoE) accounts for roughly 71% of total compute time, not because the math is hard but because data must be shuttled between HBM and SRAM.

Tile-based accelerators expand this hierarchy by replacing one large chip with a grid of small tiles (e.g., 32 x 32 or larger), each with its own matrix engine, vector engine, and local memory. Tiles communicate through a network-on-chip (NoC) that supports hardware collective primitives such as multicast and reduction. The central thesis of FlatAttention is that on such fabric, attention should be computed by collaborating tiles, with data flowing through the NoC rather than round-tripping through HBM.

---

2. FlatAttention's Approach

2.1 Algorithm Sketch

Traditional FlashAttention loops block-by-block over Q, K, V inside a single SM, writing partial results through HBM. FlatAttention instead:

1. Loads K and V chunks once from HBM on diagonal tiles. 2. Multicasts them over the NoC to a group of cooperating tiles. 3. Computes local softmax in parallel on each tile. 4. Reduces global softmax statistics (max, sum) over the NoC. 5. Streams the final result back to HBM.

K/V leave HBM once, intermediate statistics are exchanged on-chip, and softmax reductions stay within the NoC.

2.2 Groups, Async Pipelining, and Variants

  • Groups: tiles are clustered (e.g., 8 x 8 per group) so collectives are local and scalable.
  • Async pipeline: matrix multiplication, softmax, and NoC transfers are overlapped, keeping matrix engines near saturation.
  • Variants: the same dataflow supports MHA, GQA, and MLA in both prefill and decode modes.
  • ---

    3. Experimental Results

    3.1 Single-Chip (32 x 32 Tile Array)

    | Metric | FlatAttention | FlashAttention-3 (same silicon) | Improvement | |---|---|---|---| | Matrix-engine utilization | 92.3% | ~25% | 3.7x | | HBM traffic | 1x | 16x | 16x reduction | | End-to-end speed | 1x | 4.1x slower | 4.1x faster |

    3.2 Attention Variants

    In compute-bound prefill, FlatAttention sustains ~86% matrix-engine utilization. In memory-bound decode (MHA, GQA, MLA), it reaches ~78% of HBM bandwidth, indicating the bottleneck has shifted away from memory. Across variants, decoding is about 1.9x faster than an NVIDIA GH200 baseline.

    3.3 Wafer-Scale DeepSeek-v3-671B (FP8)

    64 tile-based accelerators in an 8 x 8 mesh, with 1 TB/s die-to-die links at 256 ns latency, compared against a 96 x H800 cluster:

    | Metric | FlatAttention (64 chips) | SOTA (96 x H800) | Delta | |---|---|---|---| | Peak compute | 0.67x | 1x | -33% | | System throughput | 1.9x | 1x | +90% | | Per-user TPOT | 0.71x | 1x | -29% |

    Lower peak FLOPs, higher real throughput: a direct consequence of removing the memory wall.

    ---

    4. Why It Matters

  • Co-design wins: algorithms and fabric must evolve together; optimization without NoC primitives leaves large gains on the table.
  • Locality over locality of reference: moving compute to where data sits (on tiles) beats moving data to a single monolithic engine.
  • Trend signals: tile-based and wafer-scale accelerators with NoC collectives are likely to outpace general-purpose GPU clusters for fixed Transformer + MoE workloads.
  • ---

    5. Limitations and Outlook

  • Portability: gains depend on hardware multicast/reduction, so current GPUs cannot fully exploit FlatAttention.
  • Compiler load: async scheduling and group-aware collectives add significant compiler complexity.
  • Small sequences: for sub-1K contexts, the overhead of group setup can erase the advantage.
  • Future directions: 3D-stacked memory, optical chip-to-chip links, and adaptive dataflows that pick FlatAttention or FlashAttention by context size.
  • ---

    6. Takeaway

    FlatAttention is a system-level result: I/O-complexity analysis, NoC collectives, async pipelining, and end-to-end inference tuning applied together. It reframes attention as a collaborative on-chip problem and demonstrates that, on suitable fabric, breaking the memory wall yields more than raw compute ever could.

    ---

    References

  • Zhang et al., *FlatAttention: Dataflow and Fabric Collectives Co-Optimization for Large Attention-Based Model Inference on Tile-Based Accelerators*, arXiv:2604.02110, 2026
  • Dao et al., *FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning*, 2023
  • DeepSeek-AI, *DeepSeek-V3 Technical Report*, 2024
  • Benini & De Micheli, *Networks on Chips: A New SoC Paradigm*, IEEE Computer, 2002

Tags

#flatattention#tile-accelerators#memory-wall#attention-mechanism#deepseek-v3#network-on-chip#ai-inference#co-design

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177169696