Compilation of Shape Operators on Sparse Arrays
Alexander J. Root, Bobby Yan, Peiming Liu, Christophe Gyurgyik, Aart J. C. Bik, Fredrik Kjolstad
摘要
We show how to build a compiler for a sparse array language that supports shape operators such as reshaping or concatenating arrays, in addition to compute operators. Existing sparse array programming systems implement generic shape operators for only some sparse data structures, reduce shape operators on other data structures to those, and do not support fusion. Our system compiles sparse array expressions to code that efficiently iterates over reshaped views of irregular sparse data structures, without needing to materialize temporary storage for intermediates. Our evaluation shows that our approach generates sparse array code competitive with popular sparse array libraries: our generated shape operators achieve geometric mean speed-ups of 1.66×–15.3× when compared to hand-written kernels in scipy.sparse and 1.67×–651× when compared to generic implementations in pydata/sparse . For operators that require data structure conversions in these libraries, our generated code achieves geometric mean speed-ups of 7.29×–13.0× when compared to scipy.sparse and 21.3×–511× when compared to pydata/sparse . Finally, our evaluation demonstrates that fusing shape and compute operators improves the performance of several expressions by geometric mean speed-ups of 1.22×–2.23×.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Bonsai: Compiling Queries to Pruned Tree Traversals 引用了 Compilation of sparse array programming models
- Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs 引用了 Compilation of sparse array programming models
- Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs 引用了 Verified tensor-program optimization via high-level scheduling rewrites
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning 引用了 Compilation of sparse array programming models
- A Compiler for Fused Relational Operations on Multisets 引用了 Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs
- A Compiler for Fused Relational Operations on Multisets 引用了 Compilation of sparse array programming models
- FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow 引用了 Indexed Streams: A Formal Intermediate Representation for Fused Contraction Programs
- FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow 引用了 Compilation of sparse array programming models
- FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow 引用了 SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning
引用它的顶会 Paper3
- FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming DataflowRubens Lacouture, Nathan Zhang, Ritvik Sharma, Marco Siracusa 等ASPLOS 2026 · 1 次引用
- Bonsai: Compiling Queries to Pruned Tree TraversalsAlexander J. Root, Christophe Gyurgyik, Purvi Goel, Kayvon Fatahalian 等PLDI 2026
- A Compiler for Fused Relational Operations on MultisetsJames Dong, Fredrik KjolstadPLDI 2026
它引用的 Paper5
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen 等ASPLOS 2023 · 86 次引用
- Compilation of sparse array programming modelsRawn Henry, Olivia Hsu, Rohan Yadav, Stephen Chou 等OOPSLA 2021 · 26 次引用
- Verified tensor-program optimization via high-level scheduling rewritesAmanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPOPL 2022 · 25 次引用
- Indexed Streams: A Formal Intermediate Representation for Fused Contraction ProgramsScott Kovach, Praneeth Kolichala, Tiancheng Gu, Fredrik KjolstadPLDI 2023 · 11 次引用
- Architecting a Query Compiler for Spatial WorkloadsRuby Y. Tahboub, Tiark RompfSIGMOD 2020 · 9 次引用
相关 Paper
- Mosaic: An Interoperable Compiler for Tensor AlgebraManya Bansal, Olivia Hsu, Kunle Olukotun, Fredrik KjolstadPLDI 2023 · 16 次引用
- Compilation of Modular and General Sparse WorkspacesGenghan Zhang, Olivia Hsu, Fredrik KjolstadPLDI 2024 · 6 次引用
- SpDISTAL: Compiling Distributed Sparse Tensor ComputationsRohan Yadav, Alex Aiken, Fredrik KjolstadSC 2022 · 7 次引用
- Compiler Support for Sparse Tensor ConvolutionsPeiming Liu, Alexander J. Root, Anlun Xu, Yinying Li 等OOPSLA 2024 · 5 次引用
- Legate Sparse: Distributed Sparse Computing in PythonRohan Yadav, Wonchan Lee, Melih Elibol, Manolis Papadakis 等SC 2023 · 8 次引用
