paperbot · PL 论文追踪

全部论文 待读 收藏

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

Einsum 树:优化张量表达式执行的一种抽象
ASPLOS Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22025匹配度 3/10 · 论文属于张量表达式编译优化/IR,与机器学习系统及编译代码生成相邻,但不涉及用户核心关注的静态分析、Agentic 程序、LLM/Agent、浮点程序分析或贝叶斯程序分析。引用 1 inbox
Alexander Breuer, Mark Blacher, Max Engel, Joachim Giesen, Alexander Heinecke, Julien Klaus, Stefan Remke
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 Einsum Tree IR,在给定收缩路径下全局优化张量数据布局,提升 einsum 表达式整体执行性能。

Einsum 是一种声明式张量表达式语言,只规定输出与输入张量的关系,不规定计算方式。典型后端先用收缩路径算法将表达式分解为二元张量收缩序列,再执行这些收缩;而高效执行需要优化张量数据布局。已有工作分别研究收缩路径生成和单个局部二元收缩的数据布局优化,缺乏对整体执行时间的全局布局优化。本文提出 Einsum Tree IR,一种在给定收缩路径下全局优化数据布局的中间表示,以降低 einsum 表达式的整体执行开销。作者在 Arm 服务器、x86 服务器和 x86 桌面系统上评估了该方法的有效性。

问题
Einsum 只声明张量间的输出关系而不指定计算过程;现有后端将收缩路径选择与局部数据布局优化分离,难以优化整体执行时间。
方法
提出 Einsum Tree IR,作为中间表示,在给定收缩路径下对张量数据布局进行全局优化。
评估
在 Arm 服务器、x86 服务器和 x86 桌面系统上验证了方法的有效性。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{BreuerBEGHKR25,
  title = {Einsum Trees: An Abstraction for Optimizing the Execution of Tensor Expressions},
  author = {Alexander Breuer and Mark Blacher and Max Engel and Joachim Giesen and Alexander Heinecke and Julien Klaus and Stefan Remke},
  booktitle = {ASPLOS},
  year = {2025},
  doi = {10.1145/3676641.3716254}
}