Compilation of Modular and General Sparse Workspaces
Not on the map. Why?
Abstract (arXiv)
Recent years have seen considerable work on compiling sparse tensor algebra expressions. This paper addresses a shortcoming in that work, namely how to generate efficient code (in time and space) that scatters values into a sparse result tensor. We address this shortcoming through a compiler design that generates code that uses sparse intermediate tensors (sparse workspaces) as efficient adapters between compute code that scatters and result tensors that do not support random insertion. Our compiler automatically detects sparse scattering behavior in tensor expressions and inserts necessary intermediate workspace tensors. We present an algorithm template for workspace insertion that is the backbone of our code generation algorithm. Our algorithm template is modular by design, supporting sparse workspaces that span multiple user-defined implementations. Our evaluation shows that sparse workspaces can be up to 27.12× faster than the dense workspaces of prior work. On the other hand, dense workspaces can be up to 7.58× faster than the sparse workspaces generated by our compiler in other situations, which motivates our compiler design that supports both. Our compiler produces sequential code that is competitive with hand-optimized linear and tensor algebra libraries on the expressions they support, but that generalizes to any other expression. Sparse workspaces are also more memory efficient than dense workspaces as they compress away zeros. This compression can asymptotically decrease memory usage, enabling tensor computations on data that would otherwise run out of memory.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Apr 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 3.
4 papers.
- 2024Scorch: A Library for Sparse Deep Learningcited by 1
- 2025Ember: A Compiler for Efficient Embedding Operations on Decoupled Access-Execute Architecturescited by 0
- 2025Morphing-based Compression for Data-centric ML Pipelinescited by 0
- 2025FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflowcited by 0
- 2025FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow6 Nov 2025
- 2025Morphing-based Compression for Data-centric ML Pipelines15 Apr 2025
- 2025Ember: A Compiler for Efficient Embedding Operations on Decoupled Access-Execute Architectures14 Apr 2025
- 2024Scorch: A Library for Sparse Deep Learning27 May 2024