mlsanityData to 7 Oct 2026

SPLAT: A framework for optimised GPU code-generation for SParse reguLar ATtention

arXiv 2407.16847 ↗First posted 23 Jul 2024cs.PL cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

Multi-head-self-attention (MHSA) mechanisms achieve state-of-the-art (SOTA) performance across natural language processing and vision tasks. However, their quadratic dependence on sequence lengths has bottlenecked inference speeds. To circumvent this bottleneck, researchers have proposed various sparse-MHSA models, where a subset of full attention is computed. Despite their promise, current sparse libraries and compilers do not support high-performance implementations for diverse sparse-MHSA patterns due to the underlying sparse formats they operate on. These formats, which are typically designed for high-performance & scientific computing applications, are either curated for extreme amounts of random sparsity (<1% non-zero values), or specific sparsity patterns. However, the sparsity patterns in sparse-MHSA are moderately sparse (10-50% non-zero values) and varied, resulting in existing sparse-formats trading off generality for performance. We bridge this gap, achieving both generality and performance, by proposing a novel sparse format: affine-compressed-sparse-row (ACSR) and supporting code-generation scheme, SPLAT, that generates high-performance implementations for diverse sparse-MHSA patterns on GPUs. Core to our proposed format and code generation algorithm is the observation that common sparse-MHSA patterns have uniquely regular geometric properties. These properties, which can be analyzed just-in-time, expose novel optimizations and tiling strategies that SPLAT exploits to generate high-performance implementations for diverse patterns. To demonstrate SPLAT's efficacy, we use it to generate code for various sparse-MHSA models, achieving geomean speedups of 2.05x and 4.05x over hand-written kernels written in triton and TVM respectively on A100 GPUs. Moreover, its interfaces are intuitive and easy to use with existing implementations of MHSA in JAX.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 19 of its 62 references that are in the map. First posted on arXiv 23 Jul 2024.

Builds on

19 of 62 references.

References · 19

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2021Zero-Shot Text-to-Image Generationcited by 4,276
  5. 2020Longformer: The Long-Document Transformercited by 3,362
  6. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  7. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  8. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
  9. 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
  10. 2019Blockwise Self-Attention for Long Document Understandingcited by 158
  11. 2020Sparse GPU Kernels for Deep Learningcited by 138
  12. 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
7 more
  1. 2018Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractionscited by 84
  2. 2023Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecturecited by 62
  3. 2018Tiramisu: A Polyhedral Compiler for Expressing Fast and Portable Codecited by 53
  4. 2022SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learningcited by 47
  5. 2020A Systematic Survey of General Sparse Matrix-Matrix Multiplicationcited by 9
  6. 2022Heuristic Adaptability to Input Dynamics for SpMM on GPUscited by 6
  7. 2017Sympiler: Transforming Sparse Matrix Codes by Decoupling Symbolic Analysiscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 2.

5 papers.