Litcius/Paper detail

Automatic generation of efficient sparse tensor format conversion routines

Stephen Y. Chou, Fredrik Kjølstad, Saman Amarasinghe

202026 citationsDOIOpen Access PDF

Abstract

This paper shows how to generate code that efficiently converts sparse tensors between disparate storage formats (data layouts) such as CSR, DIA, ELL, and many others. We decompose sparse tensor conversion into three logical phases: coordinate remapping, analysis, and assembly. We then develop a language that precisely describes how different formats group together and order a tensor’s nonzeros in memory. This lets a compiler emit code that performs complex remappings of nonzeros when converting between formats. We also develop a query language that can extract statistics about sparse tensors, and we show how to emit efficient analysis code that computes such queries. Finally, we define an abstract interface that captures how data structures for storing a tensor can be efficiently assembled given specific statistics about the tensor. Disparate formats can implement this common interface, thus letting a compiler emit optimized sparse tensor conversion code for arbitrary combinations of many formats without hard-coding for any specific combination.

Topics & Concepts

CompilerComputer scienceTensor (intrinsic definition)Code generationProgramming languageSource codeCode (set theory)Linear algebraTensor algebraComputational scienceSparse matrixTheoretical computer scienceParallel computingAlgorithmAlgebra over a fieldKey (lock)Operating systemMathematicsSet (abstract data type)PhysicsCurrent algebraGaussianJordan algebraPure mathematicsGeometryQuantum mechanicsParallel Computing and Optimization TechniquesTensor decomposition and applicationsAdvanced Data Storage Technologies