Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs
Scott Kovach, Praneeth Kolichala, Tiancheng Gu, Fredrik Kjolstad
Abstract
We introduce indexed streams, a formal operational model and intermediate representation that describes the fused execution of a contraction language that encompasses both sparse tensor algebra and relational algebra. We prove that the indexed stream model is correct with respect to a functional semantics. We also develop a compiler for contraction expressions that uses indexed streams as an intermediate representation. The compiler is only 540 lines of code, but we show that its performance can match both the TACO compiler for sparse tensor algebra and the SQLite and DuckDB query processing libraries for relational algebra.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2a598bc5-664e-45ec-a951-e90cc125b700Cited by top-tier papers9
- Mechanised Hypersafety Proofs about Structured DataVladimir Gladshtein, Qiyuan Zhao, Willow Ahrens, Saman P. Amarasinghe et al.PLDI 2024 · 10 citations
- Auto-Differentiation of Relational Computations for Very Large Scale Machine LearningYuxin Tang, Zhimin Ding, Dimitrije Jankov, Binhang Yuan et al.ICML 2023 · 7 citations
- Compilation of Modular and General Sparse WorkspacesGenghan Zhang, Olivia Hsu, Fredrik KjolstadPLDI 2024 · 6 citations
- Foundational Multi-Modal Program VerifiersVladimir Gladshtein, George Pîrlea, Qiyuan Zhao, Vitaly Kurin et al.POPL 2026 · 4 citations
- Compilation of Shape Operators on Sparse ArraysAlexander J. Root, Bobby Yan, Peiming Liu, Christophe Gyurgyik et al.OOPSLA 2024 · 3 citations
Builds on6
- A sparse iteration space transformation framework for sparse tensor algebraRyan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson et al.OOPSLA 2020 · 51 citations
- Tensor Relational Algebra for Distributed Machine Learning System DesignBinhang Yuan, Dimitrije Jankov, Jia Zou, Yuxin Tang et al.VLDB 2021 · 33 citations
- Functional collection programming with semi-ring dictionariesAmir Shaikhha, Mathieu Huot, Jaclyn Smith, Dan OlteanuOOPSLA 2022 · 31 citations
- Autoscheduling for sparse tensor algebra with an asymptotic cost modelWillow Ahrens, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2022 · 30 citations
- Compilation of sparse array programming modelsRawn Henry, Olivia Hsu, Rohan Yadav, Stephen Chou et al.OOPSLA 2021 · 26 citations
Related papers
- The Sparse Abstract MachineOlivia Hsu, Maxwell Strange, Ritvik Sharma, Jaeyeon Won et al.ASPLOS 2023 · 37 citations
- 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
- Compilation of dynamic sparse tensor algebraStephen Chou, Saman P. AmarasingheOOPSLA 2022 · 8 citations
- A Mechanized Algebra of Verified Data Structures for Optimizing Sparse Tensor ProgramsAmanda Liu, Gilbert Louis Bernstein, Shoaib Kamil, Adam Chlipala et al.PLDI 2026
- Galley: Modern Query Optimization for Sparse Tensor ProgramsKyle Deeds, Willow Ahrens, Magdalena Balazinska, Dan SuciuSIGMOD 2025 · 3 citations
