SparseAuto: An Auto-scheduler for Sparse Tensor Computations using Recursive Loop Nest Restructuring
Open Access
- 8 October 2024
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 8 (OOPSLA2) , 527-556
Abstract
Automated code generation and performance enhancements for sparse tensor algebra have become essential in many real-world applications, such as quantum computing, physical simulations, computational chemistry, and machine learning. General sparse tensor algebra compilers are not always versatile enough to generate asymptotically optimal code for sparse tensor contractions. This paper shows how to generate asymptotically better schedules for complex sparse tensor expressions using kernel fission and fusion. We present generalized loop restructuring transformations to reduce asymptotic time complexity and memory footprint. Furthermore, we present an auto-scheduler that uses a partially ordered set (poset)-based cost model that uses both time and auxiliary memory complexities to prune the search space of schedules. In addition, we highlight the use of Satisfiability Module Theory (SMT) solvers in sparse auto-schedulers to approximate the Pareto frontier of better schedules to the smallest number of possible schedules, with user-defined constraints available at compile-time. Finally, we show that our auto-scheduler can select better-performing schedules and generate code for them. Our results show that the auto-scheduler provided schedules achieve orders of-magnitude speedup compared to the code generated by the Tensor Algebra Compiler (TACO) for several computations on different real-world tensors.Keywords
All Related Versions
Funding Information
- National Science Foundation (CCF-2216978, CCF-1919197 and CCF-19085)
This publication has 35 references indexed in Scilit:
- Tensor Network Contractions2020
- A Code Generator for High-Performance Tensor Contractions on GPUs2019
- An approach for code generation in the Sparse Polyhedral FrameworkParallel Computing, 2016
- High-performance Tensor Contractions for GPUsProcedia Computer Science, 2016
- Generating Efficient Tensor Contractions for GPUs2015
- Performance Optimization of Tensor Contraction Expressions for Many-Body Methods in Quantum ChemistryThe Journal of Physical Chemistry A, 2009
- Automatic code generation for many-body electronic structure methods: the tensor contraction engine‡‡Molecular Physics, 2006
- Tensor Contraction Engine: Abstraction and Automated Parallel Implementation of Configuration-Interaction, Coupled-Cluster, and Many-Body Perturbation TheoriesThe Journal of Physical Chemistry A, 2003
- Evaluating intrusion detection systems: the 1998 DARPA off-line intrusion detection evaluation2002
- Some Mathematical Notes on Three-Mode Factor AnalysisPsychometrika, 1966