Compiler Support for Sparse Tensor Convolutions
Peiming Liu, Alexander J. Root, Anlun Xu, Yinying Li, Fredrik Kjolstad, Aart J. C. Bik
Abstract
This paper extends prior work on sparse tensor algebra compilers to generate asymptotically efficient code for tensor expressions with affine subscript expressions. Our technique enables compiler support for a wide range of sparse computations, including sparse convolutions and pooling that are widely used in ML and graphics applications. We propose an approach that gradually rewrites compound subscript expressions to simple subscript expressions with loops that exploit the sparsity pattern of the input sparse tensors. As a result, the time complexity of the generated kernels is bounded by the number of stored elements and not by the shape of the tensors. Our approach seamlessly integrates into existing frameworks and is compatible with recent advances in compilers for sparse computations, including the flexibility to efficiently handle arbitrary combinations of different sparse tensor formats. The implementation of our algorithm is open source and upstreamed to the MLIR sparse compiler. Experimental results show that our method achieves 19.5x speedup when compared with the state-of-the-art compiler-based method at 99.9% sparsity. The generated sparse kernels start to outperform dense convolution implementations at about 80% sparsity.
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 a74fa62b-bc91-41c6-a6df-75c8ac240a95Cited by top-tier papers1
Ask how each one uses itBuilds on6
- PatDNN: Achieving Real-Time DNN Execution on Mobile Devices with Pattern-based Weight PruningWei Niu, Xiaolong Ma, Sheng Lin, Shihao Wang et al.ASPLOS 2020 · 214 citations
- ReLU Strikes Back: Exploiting Activation Sparsity in Large Language ModelsIman Mirzadeh, Keivan Alizadeh-Vahid, Sachin Mehta, Carlo C. del Mundo et al.ICLR 2024 · 109 citations
- Advancing Model Pruning via Bi-level OptimizationYihua Zhang, Yuguang Yao, Parikshit Ram, Pu Zhao et al.NeurIPS 2022 · 101 citations
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen et al.ASPLOS 2023 · 86 citations
- Compilation of sparse array programming modelsRawn Henry, Olivia Hsu, Rohan Yadav, Stephen Chou et al.OOPSLA 2021 · 26 citations
Related papers
- Compilation of Modular and General Sparse WorkspacesGenghan Zhang, Olivia Hsu, Fredrik KjolstadPLDI 2024 · 6 citations
- UniSparse: An Intermediate Language for General Sparse Format CustomizationJie Liu, Zhongyuan Zhao, Zijian Ding, Benjamin Brock et al.OOPSLA 2024 · 7 citations
- SpDISTAL: Compiling Distributed Sparse Tensor ComputationsRohan Yadav, Alex Aiken, Fredrik KjolstadSC 2022 · 7 citations
- Compressed and Parallelized Structured Tensor AlgebraMahdi Ghorbani, Emilien Bauer, Tobias Grosser, Amir ShaikhhaOOPSLA 2025 · 1 citation
- Mosaic: An Interoperable Compiler for Tensor AlgebraManya Bansal, Olivia Hsu, Kunle Olukotun, Fredrik KjolstadPLDI 2023 · 16 citations
