Einsum Trees: An Abstraction for Optimizing the Execution of Tensor Expressions

Einsum is a declarative language for tensor expressions that specifies an output tensor in terms of several input tensors. However, it does not specify how to compute the output tensor from the input tensors. A typical computational backend for the einsum language comprises two parts: First, a contraction path algorithm that breaks down an einsum expression into a sequence of binary tensor contractions. Second, the execution of the binary contractions. For efficient binary contractions, the data layout of the tensors must be optimized. So far, the computation of contraction paths and the optimization of the data layout for single, that is, local, binary tensor contractions have been studied in isolation. For optimizing the overall execution times of einsum expressions, we introduce Einsum Tree IR, an intermediate representation for globally optimizing the data layout for a given contraction path. We illustrate the effectiveness of the approach on a state-of-the-art Arm server processor, an x86 server processor, and an x86 desktop system.

Authors

Institutions

Publication Details

Published
2025-03-27
DOI
https://doi.org/10.1145/3676641.3716254
Primary Topic
Tensor decomposition and applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Einsum Trees: An Abstraction for Optimizing the Execution of Tensor Expressions

Julien Klaus, Alexander Heinecke, Joachim Giesen, Mark Blacher et al.
Tensor decomposition and applications
article

Einsum Trees: An Abstraction for Optimizing the Execution of Tensor Expressions

Julien Klaus, Alexander Heinecke, Joachim Giesen, Mark Blacher, Michael Y. Engel, Alexander Breuer, Stefan Remke
article en

Abstract

Einsum is a declarative language for tensor expressions that specifies an output tensor in terms of several input tensors. However, it does not specify how to compute the output tensor from the input tensors. A typical computational backend for the einsum language comprises two parts: First, a contraction path algorithm that breaks down an einsum expression into a sequence of binary tensor contractions. Second, the execution of the binary contractions. For efficient binary contractions, the data layout of the tensors must be optimized. So far, the computation of contraction paths and the optimization of the data layout for single, that is, local, binary tensor contractions have been studied in isolation. For optimizing the overall execution times of einsum expressions, we introduce Einsum Tree IR, an intermediate representation for globally optimizing the data layout for a given contraction path. We illustrate the effectiveness of the approach on a state-of-the-art Arm server processor, an x86 server processor, and an x86 desktop system.

Intel (United States) (US), Friedrich Schiller University Jena (DE)
Openalex Percentile: Top 92%
Tensor decomposition and applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Einsum Trees: An Abstraction for Optimizing the Execution of Tensor Expressions — Julien Klaus, Alexander Heinecke, et al. · (2025) | TGRS Research Map | TGRS