Tensor Evolution: A framework for Fast Evaluation of Tensor Computations using Recurrences

Type: Preprint

Publication Date: 2025-02-05

Citations: 0

DOI: https://doi.org/10.48550/arxiv.2502.03402

Abstract

This paper introduces a new mathematical framework for analysis and optimization of tensor expressions within an enclosing loop. Tensors are multi-dimensional arrays of values. They are common in high performance computing (HPC) and machine learning domains. Our framework extends Scalar Evolution -- an important optimization pass implemented in both LLVM and GCC -- to tensors. Scalar Evolution (SCEV) relies on the theory of `Chain of Recurrences' for its mathematical underpinnings. We use the same theory for Tensor Evolution (TeV). While some concepts from SCEV map easily to TeV -- e.g. element-wise operations; tensors introduce new operations such as concatenation, slicing, broadcast, reduction, and reshape which have no equivalent in scalars and SCEV. Not all computations are amenable to TeV analysis but it can play a part in the optimization and analysis parts of ML and HPC compilers. Also, for many mathematical/compiler ideas, applications may go beyond what was initially envisioned, once others build on it and take it further. We hope for a similar trajectory for the tensor-evolution concept.

Locations

  • arXiv (Cornell University) - View - PDF

Similar Works

Action Title Year Authors
+ Sparse Tensor Algebra Optimizations with Workspaces 2018 Fredrik Kjølstad
Willow Ahrens
Shoaib Kamil
Saman Amarasinghe
+ Sparse Tensor Algebra Optimizations with Workspaces 2018 Fredrik Kjølstad
Willow Ahrens
Shoaib Kamil
Saman Amarasinghe
+ PDF Chat The tensor algebra compiler 2017 Fredrik Kjølstad
Shoaib Kamil
Stephen Y. Chou
David Lugato
Saman Amarasinghe
+ The Tensor Algebra Compiler 2017 Fredrik Kjølstad
Shoaib Kamil
Stephen Y. Chou
David Lugato
Saman Amarasinghe
+ Differentiating a Tensor Language 2020 Gilbert Bernstein
Michael W. Mara
Tzu‐Mao Li
Dougal Maclaurin
Jonathan Ragan‐Kelley
+ PDF Chat High-Performance Generalized Tensor Operations 2018 Roman A. Gareev
Tobias Grosser
Michael Kruse
+ PDF Chat Iterator-Based Design of Generic C++ Algorithms for Basic Tensor Operations 2022 Cem Savaş Başsoy
+ A High Performance Sparse Tensor Algebra Compiler in MLIR 2021 Ruiqin Tian
Luanzheng Guo
Jiajia Li
Bin Ren
Gökçen Kestor
+ PDF Chat TTC: a tensor transposition compiler for multiple architectures 2016 Paul Springer
Aravind Sankaran
Paolo Bientinesi
+ PDF Chat Decoupling the optimization space of tensor computation for a better understanding of performance on Intel CPU 2022 Nicolas Tollenaere
+ Compiling Tensor Expressions into Einsum 2023 Julien Klaus
Mark Blacher
Joachim Giesen
+ PDF Chat Guide Automatic Vectorization by means of Machine Learning: A Case Study of Tensor Contraction Kernels 2016 Antoine Trouvé
Arnaldo J. CRUZ
Kazuaki Murakami
Masaki Arai
Tadashi Nakahira
Eiji Yamanaka
+ Stripe: Tensor Compilation via the Nested Polyhedral Model 2019 Tim Zerrell
Jeremy Bruestle
+ TRIOT: Faster iteration over multidimensional arrays in C++11. 2016 Oliver Serang
+ Tensor Computations: Applications and Optimization (Dagstuhl Seminar 20111) 2020 Paolo Bientinesi
David A. Ham
Furong Huang
Paul H. J. Kelly
Christian Lengauer
Saday Sadayappan
+ Tensor Iterators for Flexible High-Performance Tensor Computation 2023 John Jolly
Priya Goyal
Vishal Sahoo
Hans Johansen
Mary Hall
+ HPTT: A High-Performance Tensor Transposition C++ Library 2017 P. T. Springer
Tong Su
Paolo Bientinesi
+ HPTT: A High-Performance Tensor Transposition C++ Library 2017 Paul Springer
Tong Su
Paolo Bientinesi
+ A High-Performance Sparse Tensor Algebra Compiler in Multi-Level IR 2021 Ruiqin Tian
Luanzheng Guo
Jiajia Li
Bin Ren
Gökçen Kestor
+ Optimizing tensor contraction expressions for hybrid CPU-GPU execution 2013 MaWenjing
KrishnamoorthySriram
VillaOreste
KowalskiKarol
AgrawalGagan

Works That Cite This (0)

Action Title Year Authors

Works Cited by This (0)

Action Title Year Authors