Sparse Tensor Algebra Optimizations with Workspaces

02/28/2018
by   Fredrik Kjolstad, et al.
0

This paper shows how to optimize sparse tensor algebraic expressions by introducing temporary tensors, called workspaces, into the resulting loop nests. We develop a new intermediate language for tensor operations called concrete index notation that extends tensor index notation. Concrete index notation expresses when and where sub-computations occur and what tensor they are stored into. We then describe the workspace optimization in this language, and how to compile it to sparse code by building on prior work in the literature. We demonstrate the importance of the optimization on several important sparse tensor kernels, including sparse matrix-matrix multiplication (SpMM), sparse tensor addition (SpAdd), and the matricized tensor times Khatri-Rao product (MTTKRP) used to factorize tensors. Our results show improvements over prior work on tensor algebra compilation and brings the performance of these kernels on par with state-of-the-art hand-optimized implementations. For example, SpMM was not supported by prior tensor algebra compilers, the performance of MTTKRP on the nell-2 data set improves by 35 sparse results.

READ FULL TEXT
research
02/28/2018

Automatic Generation of Sparse Tensor Kernels with Workspaces

Recent advances in compiler theory describe how to compile sparse tensor...
research
11/18/2022

Compiling Structured Tensor Algebra

Tensor algebra is essential for data-intensive workloads in various comp...
research
08/13/2022

Tensor Algebra on an Optoelectronic Microchip

Tensor algebra lies at the core of computational science and machine lea...
research
08/31/2022

The Sparse Abstract Machine

We propose the Sparse Abstract Machine (SAM), an intermediate representa...
research
02/21/2017

Scalar and Tensor Parameters for Importing Tensor Index Notation including Einstein Summation Notation

In this paper, we propose a method for importing tensor index notation, ...
research
08/02/2022

OLLIE: Derivation-based Tensor Program Optimizer

Boosting the runtime performance of deep neural networks (DNNs) is criti...
research
07/11/2023

Minimum Cost Loop Nests for Contraction of a Sparse Tensor with a Tensor Network

Sparse tensor decomposition and completion are common in numerous applic...

Please sign up or login with your details

Forgot password? Click here to reset