[Paper Review] SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning
SparseTIR introduces a composable intermediate representation for sparse deep learning compilation, enabling efficient optimization through composable formats and transformations. It achieves 1.05–7.45× speedups over vendor libraries on sparse operators and up to 40.18× speedup on end-to-end GNN inference by dynamically composing optimal sparse formats and hardware-aware optimizations.
Sparse tensors are rapidly becoming critical components of modern deep learning workloads. However, developing high-performance sparse operators can be difficult and tedious, and existing vendor libraries cannot satisfy the escalating demands from new operators. Sparse tensor compilers simplify the development of operators, but efficient sparse compilation for deep learning remains challenging because a single sparse format cannot maximize hardware efficiency, and single-shot compilers cannot keep up with latest hardware and system advances. In this paper, we observe that the key to addressing both these challenges is to leverage composable formats and composable transformations. We propose SparseTIR, a sparse tensor compilation abstraction that offers composable formats and composable transformations for deep learning workloads. SparseTIR constructs a search space over these composable components for performance tuning. With these improvements, SparseTIR obtains consistent performance speedups vs vendor libraries on GPUs for single operators: 1.20-2.34x for GNN operators, 1.05-2.98x for sparse attention operators, and 0.56-7.45x for sparse convolution operators. SparseTIR also accelerates end-to-end GNNs by 1.08-1.52x for GraphSAGE training, and 4.20-40.18x for RGCN inference.
Motivation & Objective
- Address the challenge of high-performance sparse operator development in deep learning, where existing vendor libraries lack support for emerging, diverse workloads.
- Overcome the limitations of single-format sparse compilers that cannot adapt to heterogeneous hardware or evolving deep learning workloads.
- Enable efficient, automated performance tuning for sparse operators by decoupling format and scheduling decisions.
- Support end-to-end acceleration of complex deep learning workloads like GNNs and sparse transformers through composable compilation abstractions.
- Provide a scalable, extensible framework that reuses existing dense tensor compiler optimizations while enabling new sparse-specific transformations.
Proposed method
- Introduce SparseTIR, a composable intermediate representation (IR) that separates sparse format specification from computation description.
- Enable format composability by allowing different parts of a sparse tensor to be stored in different optimal formats based on local sparsity patterns.
- Enable transformation composability by decomposing compilation into a sequence of reusable, composable program transformations.
- Leverage existing loop-level abstractions from dense tensor compilers (e.g., tensorization, tiling) and extend them for sparse data handling.
- Construct a search space over composable formats and transformations to guide automated performance tuning via a configurable search system.
- Integrate hardware-specific optimizations (e.g., tensor cores, GPU mapping) from existing compilers to accelerate sparse kernels on modern accelerators.
Experimental results
Research questions
- RQ1Can composable formats improve performance portability and hardware utilization across diverse sparse deep learning workloads?
- RQ2Can composable transformations enable efficient reuse of dense tensor compiler optimizations in sparse compilation?
- RQ3Can a search-based tuning system over composable components outperform vendor-optimized libraries on emerging sparse operators?
- RQ4To what extent can SparseTIR accelerate end-to-end GNN training and inference compared to baseline libraries?
- RQ5How does format composability enable better exploitation of hardware features like tensor cores and memory hierarchies in sparse kernels?
Key findings
- SparseTIR achieves 1.20–2.34× speedup over vendor libraries on GNN SpMM operators, with the highest gains on highly irregular sparsity patterns.
- For sparse attention operators, SparseTIR delivers 1.05–2.98× speedup, demonstrating effectiveness on moderately sparse, structured sparsity.
- On sparse convolution operators, SparseTIR achieves up to 7.45× speedup, significantly outperforming vendor libraries on point cloud-based workloads.
- End-to-end GraphSAGE training is accelerated by 1.08–1.52×, showing consistent gains in full-model training pipelines.
- RGCN inference sees dramatic improvements, with speedups ranging from 4.20× to 40.18×, highlighting the benefit of composable optimization in complex, heterogeneous sparsity.
- The artifact demonstrates reproducibility across different GPUs (RTX 3070, V100), with results closely matching the paper’s reported figures when L2 cache flushing is enabled.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.