Lune

DAC2024Top-tier venue

SWAT: Scalable and Efficient Window Attention-based Transformers Acceleration on FPGAs

Zhenyu Bai, Pranav Dangi, Huize Li, Tulika Mitra

Abstract

Efficiently supporting long context length is crucial for Transformer models. The quadratic complexity of the self-attention computation plagues traditional Transformers. Sliding window-based static sparse attention mitigates the problem by limiting the attention scope of the input tokens, reducing the theoretical complexity from quadratic to linear. Although the sparsity induced by window attention is highly structured, it does not align perfectly with the microarchitecture of the conventional accelerators, leading to sub-optimal implementation. In response, we propose a dataflow-aware FPGA-based accelerator design, SWAT, that efficiently leverages the sparsity to achieve scalable performance for long input. The proposed microarchitecture is based on a design that maximizes data reuse by using a combination of row-wise dataflow, kernel fusion optimization, and an input-stationary design considering the distributed memory and computation resources of FPGA. Consequently, it achieves up to 22× and 5.7× improvement in latency and energy efficiency compared to the baseline FPGA-based accelerator and 15× energy efficiency compared to GPU-based solution.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PADE: A Predictor-Free Sparse Attention Accelerator via Unified Execution and Stage Fusion cites Sanger: A Co-Design Framework for Enabling Sparse Attention using Reconfigurable Architecture
  • PADE: A Predictor-Free Sparse Attention Accelerator via Unified Execution and Stage Fusion cites Big Bird: Transformers for Longer Sequences
  • PADE: A Predictor-Free Sparse Attention Accelerator via Unified Execution and Stage Fusion cites MCBP: A Memory-Compute Efficient LLM Inference Accelerator Leveraging Bit-Slice-enabled Sparsity and Repetitiveness
  • Long Range Arena : A Benchmark for Efficient Transformers cites Big Bird: Transformers for Longer Sequences
  • MCBP: A Memory-Compute Efficient LLM Inference Accelerator Leveraging Bit-Slice-enabled Sparsity and Repetitiveness cites Sanger: A Co-Design Framework for Enabling Sparse Attention using Reconfigurable Architecture
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Long Range Arena : A Benchmark for Efficient Transformers
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Big Bird: Transformers for Longer Sequences
  • A Data-Driven Dynamic Execution Orchestration Architecture cites Sanger: A Co-Design Framework for Enabling Sparse Attention using Reconfigurable Architecture
  • A Data-Driven Dynamic Execution Orchestration Architecture cites Big Bird: Transformers for Longer Sequences
  • Accelerating Sparse Transformer Inference on GPU cites Big Bird: Transformers for Longer Sequences
  • Accelerating Sparse Transformer Inference on GPU cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding cites Long Range Arena : A Benchmark for Efficient Transformers
  • Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding cites Big Bird: Transformers for Longer Sequences
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. MCBP: A Memory-Compute Efficient LLM Inference Accelerator Leveraging Bit-Slice-enabled Sparsity and RepetitivenessHuizheng Wang, Zichuan Wang, Zhiheng Yue, Yousheng Long et al.MICRO 2025 · 10 citations
  2. PADE: A Predictor-Free Sparse Attention Accelerator via Unified Execution and Stage FusionHuizheng Wang, Hongbin Wang, Zichuan Wang, Zhiheng Yue et al.HPCA 2026 · 2 citations
  3. Accelerating Sparse Transformer Inference on GPUWenhao Dai, Haodong Deng, Mengfei Rong, Xinyu Yang et al.PPoPP 2026 · 1 citation
  4. A Data-Driven Dynamic Execution Orchestration ArchitectureZhenyu Bai, Pranav Dangi, Rohan Juneja, Zhaoying Li et al.ASPLOS 2026

Builds on11

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
  3. Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen et al.ICLR 2021 · 881 citations
  4. Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image EncodingPengchuan Zhang, Xiyang Dai, Jianwei Yang, Bin Xiao et al.ICCV 2021 · 384 citations
  5. Sanger: A Co-Design Framework for Enabling Sparse Attention using Reconfigurable ArchitectureLiqiang Lu, Yicheng Jin, Hangrui Bi, Zizhang Luo et al.MICRO 2021 · 221 citations

Related papers

  1. A length adaptive algorithm-hardware co-design of transformer on FPGA through sparse attention and dynamic pipeliningHongwu Peng, Shaoyi Huang, Shiyang Chen, Bingbing Li et al.DAC 2022 · 49 citations
  2. SALO: an efficient spatial accelerator enabling hybrid sparse attention mechanisms for long sequencesGuan Shen, Jieru Zhao, Quan Chen, Jingwen Leng et al.DAC 2022 · 37 citations
  3. Efficient Transformer Inference with Statically Structured Sparse AttentionSteve Dai, Hasan Genc, Rangharajan Venkatesan, Brucek KhailanyDAC 2023 · 11 citations
  4. SpARC: Token Similarity-Aware Sparse Attention Transformer Accelerator via Row-wise ClusteringHan Cho, Dongjun Kim, Seung-Eon Hwang, Jongsun ParkDAC 2024 · 7 citations
  5. FLAT: An Optimized Dataflow for Mitigating Attention BottlenecksSheng-Chun Kao, Suvinay Subramanian, Gaurav Agrawal, Amir Yazdanbakhsh et al.ASPLOS 2023 · 68 citations
Dusk over the sea between two cliffs drawn in fine vertical lines