paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Neptune: Advanced ML Operator Fusion for Locality and Parallelism on GPUs

Neptune:面向GPU局部性与并行性的高级ML算子融合
PLDI 10(PLDI)2026匹配度 3/10 · 该论文属于张量编译器与GPU算子融合优化,虽涉及编程语言/编译技术,但与用户核心关注的静态分析、Agentic程序分析、浮点程序分析及贝叶斯程序分析均无直接关联,仅与“PL+AI/ML系统”存在较弱的相邻关系。引用 6 inbox
Yifan Zhao, Egan Johnson, Prasanth Chatarasi, Vikram Adve, Sasa Misailovic
crossref: 2026-09-10

AI 速览

一句话:提出张量编译器Neptune,通过打破依赖并构造代数修正表达式,实现归约算子序列的高级融合与高效注意力。

现有张量编译器难以融合带循环携带依赖的复杂归约,如注意力机制。Neptune提出高级算子融合:有意打破部分依赖,再构造代数修正表达式补偿,使kernel仍输出正确结果。将Neptune用于普通注意力算子,可生成等价于FlashAttention与FlashDecoding的算子。在十个注意力基准上,从普通注意力代码和高层调度模板出发,Neptune优于Triton、TVM、FlexAttention,包括基于Triton的FlashAttention实现;在四种NVIDIA与AMD GPU上平均较次优方案加速1.35×,NVIDIA最高2.65×,AMD最高3.32×。

问题
现有张量编译器难以融合包含循环携带依赖的复杂归约计算,例如注意力机制。
方法
Neptune有意打破部分现有依赖,并构造代数修正表达式进行补偿,从普通注意力代码与高层调度模板生成正确且高效的融合kernel。
评估
在十个注意力基准和四种NVIDIA与AMD GPU架构上,与Triton、TVM、FlexAttention及Triton版FlashAttention实现比较,平均加速1.35×,最高达2.65×(NVIDIA)和3.32×(AMD)。
原文摘要(Abstract)

Operator fusion has become a key optimization for deep learning, which combines multiple deep learning operators to improve data reuse and reduce global memory transfers. However, existing tensor compilers struggle to fuse complex reduction computations involving loop-carried dependencies, such as attention mechanisms. This paper introduces Neptune, a tensor compiler for advanced operator fusion for sequences of reduction operators. Neptune presents a new approach for advanced operator fusion, which intentionally breaks some existing dependencies and compensates by constructing algebraic correction expressions that allow the kernel to produce the correct result. Applying Neptune’s advanced operator fusion to a plain attention operator generates operators equivalent to FlashAttention and FlashDecoding. On ten attention-based benchmarks, Neptune, starting from a plain attention code and a high-level scheduling template, outperforms existing compilers like Triton, TVM, and FlexAttention, including Triton-based implementations of FlashAttention. Across four different GPU architectures from NVIDIA and AMD, Neptune-generated kernels have an average speedup of 1.35× over the next best alternative, with up to 2.65 × speedup on Nvidia GPUs and up to 3.32 × on AMD GPUs, demonstrating its effectiveness for deep learning workloads.

链接与引用

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

BibTeX
@article{abs-2510-08726,
  title = {Neptune: Advanced ML Operator Fusion for Locality and Parallelism on GPUs},
  author = {Yifan Zhao and Egan Johnson and Prasanth Chatarasi and Vikram Adve and Sasa Misailovic},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808298}
}