SystolicAttention: Fusing FlashAttention within a Single Systolic Array

Jiawei Lin, Yuanlong Li, Guokai Chen, Thomas Bourgeat
7/15/2025
9 citations
cs.ARcs.AI
transformer-attention

Official code: VCA-EPFL/FSA (209 stars, Scala, last commit 2026-04-15).

Abstract

Transformer models rely heavily on the scaled dot-product attention (SDPA) operation, typically implemented as FlashAttention. Characterized by its frequent interleaving of matrix multiplications and softmax operations, FlashAttention fails to fully utilize the compute resources of modern systolic-array-based accelerators designed for consecutive and large matrix multiplications.

Show full abstract

To fully unleash the performance potential of systolic arrays for FlashAttention, we propose FSA, an enhanced systolic array architecture that runs the entire FlashAttention on the array without external vector units. Combined with SystolicAttention, an optimized kernel for FSA that achieves fine-grained and element-wise overlapping of FlashAttention operations, FSA maximizes array utilization while preserving the original floating-point operation order of FlashAttention. We implement FSA in synthesizable RTL and evaluate its performance against state-of-the-art systolic-array-based accelerators. Our results show that FSA achieves 1.77x and 4.83x higher attention FLOPs/s utilization compared to AWS Neuron-v2 and Google TPUv5e, respectively. We synthesize FSA in a 16 nm technology at 1.5 GHz, and results indicate only a 12% area overhead compared to a standard weight-stationary systolic array.

View on arXivView PDF

Code Implementations(1)

VCA-EPFL/FSAOfficial100%

FSA: Fusing FlashAttention within a Single Systolic Array

20923Scala, PythonJul 15, 20257 months ago

Similar Papers

Cite this paper

@article{lin2025systolicattention,
  title  = {SystolicAttention: Fusing FlashAttention within a Single Systolic Array},
  author = {Jiawei Lin and Yuanlong Li and Guokai Chen and Thomas Bourgeat},
  year   = {2025},
  eprint = {2507.11331},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.11331v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.11331.svg)](https://codeofpaper.com/paper/2507.11331)

Discussion