arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.10374cs.PL
收藏

使用整数集关系对布局抽象进行建模

Modeling Layout Abstractions Using Integer Set Relations

NVIDIA(英伟达)

Somashekaracharya G Bhaskaracharya, Aravind Acharya, Bastian Hagedorn, Vinod Grover

AI总结:

针对CuTe与Triton布局系统缺乏统一数学基础的问题,本文提出基于ISL的整数集关系统一建模方法,实现两类布局的形式化表示、操作与验证,实验证明该方法可覆盖全复杂度布局场景。

摘要:

现代深度学习编译器依赖布局抽象来管理逻辑张量结构与物理内存排布之间的复杂映射。CuTe布局与Triton线性布局是被广泛采用的行业标准,但这两类布局系统基于不同的数学基础独立运行,阻碍了统一形式化分析与跨系统推理。本文通过引入一种新方法填补了这一空白:该方法利用整数集库(Integer Set Library, ISL),通过整数集关系为两类布局系统构建统一的数学表示,从而支持严谨的形式化分析、正确性验证,并为未来的跨系统优化策略奠定基础。本文的方法通过整数集关系对CuTe布局进行建模,这类关系编码了从多维坐标到线性索引的基于步长的计算转换,包括用于优化内存访问模式、执行位级操作的复杂混洗(swizzle)操作。针对Triton线性布局,本文构建整数集关系对二元向量空间变换进行建模,其中算术运算遵循有限域F₂规则。本文利用ISL内置操作实现了一整套布局操作算法,支持布局的组合、求逆、补运算,以保证数学正确性并保留布局语义。实验评估表明,该系统可处理全范围复杂度的布局,从基础的恒等变换到具备复杂步长配置与混洗模式的复杂多维张量排布,验证了该数学建模方法在不同布局范式下的有效性。

英文摘要:

Modern deep learning compilers rely on layout abstractions to manage the complex mapping between logical tensor structures and physical memory arrangements. CuTe layouts and Triton linear layouts are widely adopted industry standards. However, these layout systems operate independently with distinct mathematical underpinnings, preventing unified formal analysis and cross-system reasoning. We bridge this gap by introducing a novel approach that leverages the Integer Set Library (ISL) to create a unified mathematical representation for both layout systems through integer set relations, thereby enabling rigorous formal analysis, correctness verification, and the foundation for future cross-system optimization strategies. Our approach models CuTe layouts through integer set relations that encode the transformation from multi-dimensional coordinates to linear indices using stride-based calculations, including sophisticated swizzle operations that perform bit-level manipulations for enhanced memory access patterns. For Triton linear layouts, we construct integer set relations that model the binary vector space transformations where arithmetic operations follow finite field F_2 rules. We implement a complete suite of layout manipulation algorithms for composition, inversion, complement using built-in operations in ISL to ensure mathematical correctness and preserve layout semantics. Experimental evaluation shows that the system handles the full spectrum of layout complexity, from elementary identity transformations to sophisticated multi-dimensional tensor arrangements with complex stride configurations and swizzle patterns, validating the mathematical modeling approach across different layout paradigms.

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

↑