arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.05066cs.PLcs.AIcs.PF
收藏

AutoLALA:用于AI和HPC内核的自动循环代数局部性分析

AutoLALA: Automatic Loop Algebraic Locality Analysis for AI and HPC Kernels

University of Rochester(罗切斯特大学)

Yifan Zhu, Yekai Pan, Yanghui Wu, Chen Ding

AI总结:

本文提出AutoLALA工具,通过符号方法分析循环程序的数据局部性,计算重用距离和数据移动复杂度,支持任意仿射循环嵌套,适用于张量收缩、einsum等计算。

摘要:

数据移动是现代计算系统的主要瓶颈。对于HPC和AI工作负载中常见的循环程序,如矩阵乘法、张量收缩、Stencil计算和einsum操作,数据通过内存层次结构的移动成本常高于算术运算成本。本文提出AutoLALA,一个开源工具,分析仿射循环程序的数据局部性。该工具接受用小型领域特定语言(DSL)编写的程序,将其降低为多面体集和映射,并生成闭合形式的符号公式用于重用距离和数据移动复杂度。AutoLALA实现了Zhu等人完全符号化的局部性分析以及Smith等人的数据移动距离(DMD)框架。特别地,它计算重用距离作为访问空间在访问映射下的像,避免了栈模拟和Denning的递归工作集公式。我们描述了DSL语法及其形式语义,多面体降低管道通过仿射变换构建时间戳空间和访问映射,以及用于推导符号重用间隔和重用距离分布的Barvinok计数操作序列。系统用Rust实现为一个模块化库,跨越三个crate,并安全绑定到Barvinok库。我们提供了命令行接口和带有LaTeX渲染输出公式的交互式Web playground。该工具处理任意仿射循环嵌套,覆盖张量收缩、einsum表达式、Stencil计算和一般多面体程序。

英文摘要:

Data movement is the primary bottleneck in modern computing systems. For loop-based programs common in high-performance computing (HPC) and AI workloads, including matrix multiplication, tensor contraction, stencil computation, and einsum operations, the cost of moving data through the memory hierarchy often exceeds the cost of arithmetic. This paper presents AutoLALA, an open-source tool that analyzes data locality in affine loop programs. The tool accepts programs written in a small domain-specific language (DSL), lowers them to polyhedral sets and maps, and produces closed-form symbolic formulas for reuse distance and data movement complexity. AutoLALA implements the fully symbolic locality analysis of Zhu et al. together with the data movement distance (DMD) framework of Smith et al. In particular, it computes reuse distance as the image of the access space under the access map, avoiding both stack simulation and Denning's recursive working-set formulation. We describe the DSL syntax and its formal semantics, the polyhedral lowering pipeline that constructs timestamp spaces and access maps via affine transformations, and the sequence of Barvinok counting operations used to derive symbolic reuse-interval and reuse-distance distributions. The system is implemented in Rust as a modular library spanning three crates, with safe bindings to the Barvinok library. We provide both a command-line interface and an interactive web playground with LaTeX rendering of the output formulas. The tool handles arbitrary affine loop nests, covering workloads such as tensor contractions, einsum expressions, stencil computations, and general polyhedral programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑