连续张量抽象:索引为实数的场景
The Continuous Tensor Abstraction: Where Indices are Real
AI总结:
本研究提出支持实值索引的连续张量抽象及代数体系,配套高效存储格式与自动内核生成技术,首次用张量编程表达多领域问题,性能优于手动优化库且大幅减少代码量。
摘要:
本文提出了连续张量抽象(continuous tensor abstraction),允许索引取实数值(例如A[3.14])。文中还提出了连续张量代数表达式,如C(x,y) = A(x,y) * B(x,y),其中索引定义在连续域上。本工作将传统张量模型扩展至包含连续张量的范畴。我们的实现支持分段常数张量,使得无限域可在有限时间内完成处理。我们还提出了一种用于高效存储的新型张量格式,以及用于自动内核生成的代码生成技术。我们的抽象首次实现了用张量编程语言来表达计算几何、计算机图形学等领域的问题。在各类应用中,我们的方法性能与主流库中手动优化的内核相当甚至更优。与CPU上的手动实现库相比,我们基于编译器的实现在二维半径搜索任务中平均加速9.20倍,代码行数(LoC)减少约60倍;在基因组区间重叠查询任务中加速1.22倍,代码行数节省约18倍;在神经辐射场(Neural Radiance Field)的三线性插值任务中加速1.69倍,代码行数节省约6倍。
英文摘要:
This paper introduces the continuous tensor abstraction, allowing indices to take real-number values (for example, 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, enabling infinite domains to 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 than 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.20x on 2D radius search with approximately 60x fewer lines of code (LoC), 1.22x on genomic interval overlapping queries (with approximately 18x LoC saving), and 1.69x on trilinear interpolation in Neural Radiance Field (with approximately 6x LoC saving).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。