A sparse iteration space transformation framework for sparse tensor algebra
Ryan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson, Stephen Chou, Shoaib Kamil, Saman P. Amarasinghe, Fredrik Kjolstad
摘要
We address the problem of optimizing sparse tensor algebra in a compiler and show how to define standard loop transformations---split, collapse, and reorder---on sparse iteration spaces. The key idea is to track the transformation functions that map the original iteration space to derived iteration spaces. These functions are needed by the code generator to emit code that maps coordinates between iteration spaces at runtime, since the coordinates in the sparse data structures remain in the original iteration space. We further demonstrate that derived iteration spaces can tile both the universe of coordinates and the subset of nonzero coordinates: the former is analogous to tiling dense iteration spaces, while the latter tiles sparse iteration spaces into statically load-balanced blocks of nonzeros. Tiling the space of nonzeros lets the generated code efficiently exploit heterogeneous compute resources such as threads, vector units, and GPUs. We implement these concepts by extending the sparse iteration theory implementation in the TACO system. The associated scheduling API can be used by performance engineers or it can be the target of an automatic scheduling system. We outline one heuristic autoscheduling system, but other systems are possible. Using the scheduling API, we show how to optimize mixed sparse-dense tensor algebra expressions on CPUs and GPUs. Our results show that the sparse transformations are sufficient to generate code with competitive performance to hand-optimized implementations from the literature, while generalizing to all of the tensor algebra.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 24 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- The Sparse Abstract Machine 引用了 SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning
- TensorIR: An Abstraction for Automatic Tensorized Program Optimization 引用了 Automatic generation of efficient sparse tensor format conversion routines
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning 引用了 TensorIR: An Abstraction for Automatic Tensorized Program Optimization
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning 引用了 Automatic generation of efficient sparse tensor format conversion routines
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning 引用了 Tensor Program Optimization with Probabilistic Programs
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning 引用了 SparTA: Deep-Learning Model Sparsity via Tensor-with-Sparsity-Attribute
- SparTA: Deep-Learning Model Sparsity via Tensor-with-Sparsity-Attribute 引用了 Automatic generation of efficient sparse tensor format conversion routines
引用它的顶会 Paper24
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen 等ASPLOS 2023 · 86 次引用
- Tensor Program Optimization with Probabilistic ProgramsJunru Shao, Xiyou Zhou, Siyuan Feng, Bohan Hou 等NeurIPS 2022 · 85 次引用
- TensorIR: An Abstraction for Automatic Tensorized Program OptimizationSiyuan Feng, Bohan Hou, Hongyi Jin, Wuwei Lin 等ASPLOS 2023 · 80 次引用
- SparTA: Deep-Learning Model Sparsity via Tensor-with-Sparsity-AttributeNingxin Zheng, Bin Lin, Quanlu Zhang, Lingxiao Ma 等OSDI 2022 · 53 次引用
- The Sparse Abstract MachineOlivia Hsu, Maxwell Strange, Ritvik Sharma, Jaeyeon Won 等ASPLOS 2023 · 37 次引用
它引用的 Paper1
相关 Paper
- SparseAuto: An Auto-scheduler for Sparse Tensor Computations using Recursive Loop Nest RestructuringAdhitha Dias, Logan Anderson, Kirshanthan Sundararajah, Artem Pelenitsyn 等OOPSLA 2024 · 6 次引用
- SpDISTAL: Compiling Distributed Sparse Tensor ComputationsRohan Yadav, Alex Aiken, Fredrik KjolstadSC 2022 · 7 次引用
- Mosaic: An Interoperable Compiler for Tensor AlgebraManya Bansal, Olivia Hsu, Kunle Olukotun, Fredrik KjolstadPLDI 2023 · 16 次引用
- Autoscheduling for sparse tensor algebra with an asymptotic cost modelWillow Ahrens, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2022 · 30 次引用
- Compilation of Modular and General Sparse WorkspacesGenghan Zhang, Olivia Hsu, Fredrik KjolstadPLDI 2024 · 6 次引用
