NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FlatAttention: Dataflow and Fabric Collectives Co-Optimization for Efficient Multi-Head Attention on Tile-Based Many-PE Accelerators

Chi Zhang, Luca Colagrande, Renzo Andri, Thomas Benz, Gamze Islamoglu, Alessandro Nadalini, Francesco Conti, Yawei Li, Luca Benini

Introduction

Multi-Head Attention (MHA) serves as the computational core of modern Transformer-based Large Language Models (LLMs) such as GPT-4 and LLaMA. However, as model sizes and sequence lengths grow, MHA increasingly encounters a "memory wall." The operation is inherently memory-bound, meaning performance is limited by the speed of data movement from High Bandwidth Memory (HBM) rather than the raw throughput of the processing units.

While FlashAttention significantly improved MHA performance on GPUs by fusing kernels to maximize local SRAM usage, these optimizations do not translate directly to emerging "tile-based" many-core accelerators, such as Tesla’s Dojo or Tenstorrent’s Blackhole. These architectures utilize a mesh of small, independent processing elements (PEs) where individual tile memory is often too small to store the large data blocks required to minimize HBM traffic. FlatAttention addresses this gap by co-optimizing dataflow and hardware-supported collective communication.

The Challenge: Scaling Attention on Many-PE Architectures

On tile-based accelerators, the primary bottleneck is the mismatch between the small local L1 cache of a single tile and the massive data requirements of MHA. Standard dataflows typically face a binary struggle: either they starve the compute units while waiting for HBM reloads, or they become overwhelmed by slow, software-managed point-to-point communication between tiles.

FlashAttention-style tiling on these systems often fails because the optimal tile size for compute efficiency exceeds the physical memory capacity of a single PE. To overcome this, a new approach is needed that treats a group of tiles as a single logical unit capable of pooling resources.

The FlatAttention Methodology

FlatAttention introduces a novel dataflow designed to break the attention bottleneck through three primary mechanisms:

1. Tile Grouping (Flattening)

Instead of assigning an MHA block to a single tile, FlatAttention "flattens" the workload across a group of tiles. By treating multiple tiles as a single "virtual entity," the system can pool their collective L1 memory. This allows the group to process significantly larger data blocks, which drastically reduces the frequency of expensive HBM accesses.

2. Fabric Collectives

To facilitate efficient data sharing within a tile group, FlatAttention leverages hardware-supported collective primitives—specifically multicast and reduction—integrated directly into the Network-on-Chip (NoC). Rather than relying on slow, software-defined transfers, data is duplicated "in-flight" across the mesh. This hardware-level support speeds up inter-tile communication by more than 6× compared to standard point-to-point methods.

3. Asynchronous Execution and Co-Design

The dataflow is designed to overlap matrix multiplications (performed on specialized matrix engines) with SoftMax calculations and data movement (handled by vector engines and DMA). This ensures that the matrix units—the most power-hungry and productive parts of the chip—remain at peak utilization. This co-design was facilitated by the SoftHier framework, a modeling environment developed by the authors to find the optimal balance between tile counts, memory sizes, and NoC bandwidth.

Evaluation and Key Results

The researchers evaluated FlatAttention using synthetic MHA workloads representing modern LLM configurations (sequence lengths from 512 to 4096). The performance was compared against FlashAttention-2 and FlashAttention-3 implementations on both simulated tile-based hardware and Nvidia H100 GPUs.

  • Throughput and Utilization: FlatAttention achieved a 4.1× speedup over a FlashAttention-3 baseline on the same tile-based architecture. It reached a peak compute utilization of 89.3%.
  • Memory Efficiency: By pooling L1 resources and optimizing the dataflow, the system reduced HBM traffic by 16×. This reduction is critical for energy efficiency and scaling to longer sequence lengths.
  • Hardware Comparison: In a "BestArch" configuration (32x32 tiles), FlatAttention demonstrated 1.3× higher utilization than FlashAttention-3 running on an Nvidia H100.
  • Area and Cost: The proposed architecture is estimated to be 1.8× smaller in die size (457 mm² vs. 814 mm²) than an H100 while matching its peak performance, largely because the optimized dataflow requires 40% less HBM bandwidth to remain compute-bound.

Discussion and Future Work

The core insight of FlatAttention is the strategic trade-off between global and local communication. By leveraging hardware-level collectives, the system trades expensive HBM traffic for much cheaper inter-tile NoC traffic. However, the authors note the risk of "over-flattening": if a workload is spread across too many tiles, the synchronization overhead can diminish returns.

While FlatAttention excels in the "prefill" stage of LLM inference where sequence lengths are long, future work is required to adapt these optimizations for the "decoding" stage, which involves different memory access patterns (KV cache management). Additionally, integrating these specific NoC primitives into existing commercial hardware would require a shift in how many-core chips are designed, moving toward a more tightly coupled algorithm-architecture co-design philosophy.

Summary updated

BibTeX
@inproceedings{zhang2025flatattention,
  author = {Chi Zhang and Luca Colagrande and Renzo Andri and Thomas Benz and Gamze Islamoglu and Alessandro Nadalini and Francesco Conti and Yawei Li and Luca Benini},
  title = {{FlatAttention: Dataflow and Fabric Collectives Co-Optimization for Efficient Multi-Head Attention on Tile-Based Many-PE Accelerators}},
  booktitle = {ISVLSI},
  year = {2025},
  doi = {10.1109/isvlsi65124.2025.11130221},
}
Figure