paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Continuous Tensor Abstraction: Where Indices Are Real

连续张量抽象:当索引取实数时
OOPSLA 9(OOPSLA2)2025匹配度 3/10 · 论文属于 PL/编译器与 DSL 方向,提出连续张量抽象和自动内核生成,与机器学习系统有间接关联;但核心不是静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,因此与用户研究方向匹配度较低。引用 1 inbox
Jaeyeon Won, Willow Ahrens, Teodoro Fields Collin, Joel S. Emer, Saman Amarasinghe
crossref: 2026-09-10

AI 速览

一句话:提出允许实数索引的连续张量抽象与代数表达式,并为分段常数张量实现存储格式与自动内核生成。

传统张量模型假定索引为整数,难以直接表达计算几何、计算机图形学等连续域上的计算。本文提出连续张量抽象,允许索引取实数值(如 A[3.14]),并给出定义在连续域上的连续张量代数表达式(如 C x,y = A x,y * B x,y)。实现上聚焦分段常数张量,使无限域可在有限时间内被处理;同时设计新的张量存储格式以高效存储,并提出代码生成技术自动生成内核。这是首次用张量编程语言表达计算几何与图形学等领域的问题。评估在多种应用上与领先库中手工优化内核对比,基于编译器的实现相对 CPU 手写库在 2D 半径搜索上平均加速 9.20×、代码量减少约 60×,在基因组区间重叠查询上加速 1.22×(代码量减少约 18×),在 NeRF 三线性插值上加速 1.69×(代码量减少约 6×)。

问题
传统张量抽象仅支持整数索引,无法自然表达计算几何、图形学等连续域上的计算,导致此类问题难以用张量编程语言描述与优化。
方法
引入连续张量抽象与连续张量代数表达式,允许实数索引;针对分段常数张量设计新存储格式,并提供自动内核生成的代码生成技术,使无限域可在有限时间内处理。
评估
在 2D 半径搜索、基因组区间重叠查询与 NeRF 三线性插值等应用上,与领先库中的手工优化内核对比,分别取得 9.20×、1.22×、1.69× 的平均加速,并大幅减少代码行数。
原文摘要(Abstract)

This paper introduces the continuous tensor abstraction, allowing indices to take real-number values (e.g., A[3.14]). It also presents continuous tensor algebra expressions, such as C x,y = A x,y * B x,y , where indices are defined over a continuous domain. This work expands the traditional tensor model to include continuous tensors. Our implementation supports piecewise-constant tensors, on which infinite domains can be processed in finite time. We also introduce a new tensor format for efficient storage and a code generation technique for automatic kernel generation. For the first time, our abstraction expresses domains like computational geometry and computer graphics in the language of tensor programming. Our approach demonstrates competitive or better performance to hand-optimized kernels in leading libraries across diverse applications. Compared to hand-implemented libraries on a CPU, our compiler-based implementation achieves an average speedup of 9.20× on 2D radius search with ∼60× fewer lines of code (LoC), 1.22× on genomic interval overlapping queries (with ∼18× LoC saving), and 1.69× on trilinear interpolation in Neural Radiance Field (with ∼6× LoC saving).

链接与引用

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

BibTeX
@article{paperbot3000,
  title = {The Continuous Tensor Abstraction: Where Indices Are Real},
  author = {Jaeyeon Won and Willow Ahrens and Teodoro Fields Collin and Joel S. Emer and Saman Amarasinghe},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763146}
}