Lune

PLDI2022Top-tier venue

Autoscheduling for sparse tensor algebra with an asymptotic cost model

Willow Ahrens, Fredrik Kjolstad, Saman P. Amarasinghe

Abstract

While loop reordering and fusion can make big impacts on the constant-factor performance of dense tensor programs, the effects on sparse tensor programs are asymptotic, often leading to orders of magnitude performance differences in practice. Sparse tensors also introduce a choice of compressed storage formats that can have asymptotic effects. Research into sparse tensor compilers has led to simplified languages that express these tradeoffs, but the user is expected to provide a schedule that makes the decisions. This is challenging because schedulers must anticipate the interaction between sparse formats, loop structure, potential sparsity patterns, and the compiler itself. Automating this decision making process stands to finally make sparse tensor compilers accessible to end users.

We present, to the best of our knowledge, the first automatic asymptotic scheduler for sparse tensor programs. We provide an approach to abstractly represent the asymptotic cost of schedules and to choose between them. We narrow down the search space to a manageably small Pareto frontier of asymptotically non-dominating kernels. We test our approach by compiling these kernels with the TACO sparse tensor compiler and comparing them with those generated with the default TACO schedules. Our results show that our approach reduces the scheduling space by orders of magnitude and that the generated kernels perform asymptotically better than those generated using the default schedules.

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.

16 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

  • Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs cites Tensor Relational Algebra for Distributed Machine Learning System Design
  • Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs cites A sparse iteration space transformation framework for sparse tensor algebra
  • Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs cites Compilation of sparse array programming models
  • A sparse iteration space transformation framework for sparse tensor algebra cites Automatic generation of efficient sparse tensor format conversion routines
  • Mosaic: An Interoperable Compiler for Tensor Algebra cites A sparse iteration space transformation framework for sparse tensor algebra
  • Mosaic: An Interoperable Compiler for Tensor Algebra cites The Sparse Abstract Machine
  • Mosaic: An Interoperable Compiler for Tensor Algebra cites SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning
  • The Sparse Abstract Machine cites A sparse iteration space transformation framework for sparse tensor algebra
  • The Sparse Abstract Machine cites Compilation of sparse array programming models
  • The Sparse Abstract Machine cites SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning
  • Compilation of sparse array programming models cites A sparse iteration space transformation framework for sparse tensor algebra
  • Compilation of sparse array programming models cites Automatic generation of efficient sparse tensor format conversion routines
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites A sparse iteration space transformation framework for sparse tensor algebra
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites Compilation of sparse array programming models
  • SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning cites Automatic generation of efficient sparse tensor format conversion routines
  • TeAAL: A Declarative Framework for Modeling Sparse Tensor Accelerators cites A sparse iteration space transformation framework for sparse tensor algebra
  • TeAAL: A Declarative Framework for Modeling Sparse Tensor Accelerators cites Mosaic: An Interoperable Compiler for Tensor Algebra
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen et al.ASPLOS 2023 · 86 citations
  2. The Sparse Abstract MachineOlivia Hsu, Maxwell Strange, Ritvik Sharma, Jaeyeon Won et al.ASPLOS 2023 · 37 citations
  3. TeAAL: A Declarative Framework for Modeling Sparse Tensor AcceleratorsNandeeka Nayak, Toluwanimi O. Odemuyiwa, Shubham Ugare, Christopher W. Fletcher et al.MICRO 2023 · 19 citations
  4. Mosaic: An Interoperable Compiler for Tensor AlgebraManya Bansal, Olivia Hsu, Kunle Olukotun, Fredrik KjolstadPLDI 2023 · 16 citations
  5. Indexed Streams: A Formal Intermediate Representation for Fused Contraction ProgramsScott Kovach, Praneeth Kolichala, Tiancheng Gu, Fredrik KjolstadPLDI 2023 · 11 citations

Builds on8

  1. A sparse iteration space transformation framework for sparse tensor algebraRyan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson et al.OOPSLA 2020 · 51 citations
  2. Tensors: An abstraction for general data processingDimitrios Koutsoukos, Supun Nakandala, Konstantinos Karanasos, Karla Saur et al.VLDB 2021 · 38 citations
  3. Tensor Relational Algebra for Distributed Machine Learning System DesignBinhang Yuan, Dimitrije Jankov, Jia Zou, Yuxin Tang et al.VLDB 2021 · 33 citations
  4. Compilation of sparse array programming modelsRawn Henry, Olivia Hsu, Rohan Yadav, Stephen Chou et al.OOPSLA 2021 · 26 citations
  5. Automatic generation of efficient sparse tensor format conversion routinesStephen Chou, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2020 · 26 citations

Related papers

  1. SparseAuto: An Auto-scheduler for Sparse Tensor Computations using Recursive Loop Nest RestructuringAdhitha Dias, Logan Anderson, Kirshanthan Sundararajah, Artem Pelenitsyn et al.OOPSLA 2024 · 6 citations
  2. Compiler Support for Sparse Tensor ConvolutionsPeiming Liu, Alexander J. Root, Anlun Xu, Yinying Li et al.OOPSLA 2024 · 5 citations
  3. WACO: Learning Workload-Aware Co-optimization of the Format and Schedule of a Sparse Tensor ProgramJaeyeon Won, Charith Mendis, Joel S. Emer, Saman P. AmarasingheASPLOS 2023 · 30 citations
  4. An Input-Aware Sparse Tensor Compiler Empowered by Vectorized AccelerationXianhao He, Haotian Wang, Jiapeng Zhang, Wangdong Yang et al.DAC 2025
  5. Compressed and Parallelized Structured Tensor AlgebraMahdi Ghorbani, Emilien Bauer, Tobias Grosser, Amir ShaikhhaOOPSLA 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines