一句话:提出首个基于 tile 级等式饱和的张量程序优化器,联合优化代数等价、内存 I/O 与计算编排。
现有张量程序优化器将图级优化(算子融合、代数重写)与算子级调度(分块、并行化)割裂开来,因而无法发现类似 FlashAttention 那样需要跨算子、tile 级协调的优化。Trinity 提出首个通过 tile 级等式饱和实现可扩展联合优化的张量程序优化器。其核心洞见是:最优性能需要同时优化三个相互依赖的维度——代数等价、内存 I/O 和计算编排。为此,Trinity 设计了一种细粒度 IR,将这三个轴暴露为一等、可重写的实体,并应用等式饱和进行可扩展的联合优化,从而自动发现需要跨三维协同推理的复杂优化。在多种 Transformer 变体上,Trinity 相比 TensorRT 最高取得 2.09 倍加速,相比 TorchInductor 最高取得 2.35 倍加速,二者均为当前最先进的生产级编译器。
Modern tensor program optimizers operate at two separate levels: graph-level optimizations (operator fusion, algebraic rewrites) and operator-level scheduling (tiling, parallelization). This separation prevents them from discovering cross-operator, tile-level optimizations that make hand-tuned kernels like FlashAttention effective. We present Trinity, the first tensor program optimizer that achieves scalable joint optimization through tile-level equality saturation. Our key insight is that optimal performance requires simultaneously optimizing three interdependent dimensions -- algebraic equivalence, memory I/O, and compute orchestration. To enable this, Trinity introduces a novel fine-grained IR that exposes all three axes as first-class, rewritable entities and applies equality saturation to perform scalable joint optimization. As a result, Trinity automatically discovers complex optimizations that require coordinated reasoning across all three dimensions. Across diverse Transformer variants, Trinity achieves up to 2.09× speedup over TensorRT and 2.35× over TorchInductor, both state-of-the-art production compilers.
@inproceedings{ParkKAJKH26,
title = {Trinity: Three-Dimensional Tensor Program Optimization via Tile-level Equality Saturation},
author = {Jaehyeong Park and Youngchan Kim and Haechan An and Gieun Jeong and Jeehoon Kang and Dongsu Han},
booktitle = {ASPLOS},
year = {2026},
doi = {10.1145/3779212.3790240}
}