Looplets: A Language for Structured Coiteration
Willow Ahrens, Daniel Donenfeld, Fredrik Kjølstad, Saman Amarasinghe
Abstract
Real world arrays often contain underlying structure, such as sparsity, runs of repeated values, or symmetry. Specializing for structure yields significant speedups. But automatically generating efficient code for structured data is challenging, especially when arrays with different structure interact. We show how to abstract over array structures so that the compiler can generate code to coiterate over any combination of them. Our technique enables new array formats (such as 1DVBL for irregular clustered sparsity), new iteration strategies (such as galloping intersections), and new operations over structured data (such as concatenation or convolution).
Topics & Concepts
Computer scienceConcatenation (mathematics)CompilerData structureParallel computingCode (set theory)Array data structureConvolution (computer science)Programming languageTheoretical computer scienceAlgorithmArtificial intelligenceArithmeticMathematicsSet (abstract data type)Artificial neural networkAlgorithms and Data CompressionParallel Computing and Optimization TechniquesComputer Graphics and Visualization Techniques