paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Bonsai: Efficient and Optimal Automatic Tensor Rematerialization for Memory-Constrained DNN Training

Bonsai:面向内存受限 DNN 训练的高效且最优自动张量重计算
OOPSLA 10(OOPSLA2)2026匹配度 2/10 · 论文属于机器学习系统与编译优化,核心是 DNN 训练中张量重计算调度的 ILP 建模与扩展,与用户关注的静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析及其 LLM 交叉均无直接关系。仅在“机器学习与程序语言/编译与代码生成”标签上有弱交集。引用 0 inbox
Dat Nguyen, Vasudha Devarakonda, Anxiao Jiang, Khanh Nguyen
crossref: 2026-10-02

AI 速览

一句话:提出算子分段抽象与分段 ILP,使张量重计算在保持最优性的同时扩展到真实 DNN 模型。

GPU 内存是扩展 DNN 训练的主要瓶颈,激活张量占用常超过显存容量。张量重计算用额外计算降低峰值内存,但现有方法难以兼顾最优性与可扩展性:ILP 求解器可得数学最优解却因搜索空间组合爆炸而不适用于现代模型,启发式方法可扩展却牺牲最优性。本文提出 Bonsai,核心是算子分段抽象:将计算图划为可变大小的段,并构建轻量的分段 ILP,从而压缩搜索空间、剪除冗余解,在保持整模型全局视角的同时将决策变量减少数个数量级。在多种 DNN 架构与模型上评估,Bonsai 可扩展到真实模型,求解器开销比先进 ILP 求解器最多低 10.13×。

问题
在显存受限的 DNN 训练中,激活张量占用可能超过容量;现有张量重计算方法在 ILP 最优性与启发式可扩展性之间存在根本张力。
方法
Bonsai 通过算子分段抽象把计算图拆为可变大小单元,并在此基础上建立分段 ILP,以压缩搜索空间、剪除冗余解并大幅减少决策变量。
评估
在多种 DNN 架构和模型上评估,表明其可扩展到真实模型,且求解器开销比当前最优 ILP 求解器最多低 10.13×。
原文摘要(Abstract)

GPU memory is increasingly the primary bottleneck in scaling deep neural network (DNN) training, where the activation tensors footprint of a model may exceed the memory capacity. Tensor recomputation is a powerful technique that trades additional computation for reduced peak memory usage. However, existing approaches face a fundamental tension between performance optimality and computational scalability. On the one hand, solvers leverage Integer Linear Programming (ILP) to provide mathematically optimal solutions but suffer from the combinatorial explosion of the search space and thus become intractable for modern DNN models. On the other hand, heuristics-based approaches achieve scalability but sacrifice optimality altogether, resulting in suboptimal execution schedules. The root cause of these inefficiencies in the state of the art is the mismatch in abstraction. This paper introduces Bonsai, a framework that tackles this scalability-granularity tension. At the heart of Bonsai is a novel abstraction of operator segmentation that breaks the computation graph into flexible, variable-sized units to enable a lightweight yet effective segment-based ILP formulation. By having segments, Bonsai collapses the search space and prunes redundant solutions that stall existing solvers. This abstraction enables Bonsai to maintain a holistic view of the entire model, ensuring that no optimization opportunity is lost while reducing the number of decision variables by orders of magnitude. The evaluation across a diverse set of DNN architectures and models demonstrates that Bonsai scales to real-world models, is up to 10.13× lower solver cost than state-of-the-art ILP solvers, and delivers up to 11

链接与引用

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

BibTeX
@article{paperbot12144,
  title = {Bonsai: Efficient and Optimal Automatic Tensor Rematerialization for Memory-Constrained DNN Training},
  author = {Dat Nguyen and Vasudha Devarakonda and Anxiao Jiang and Khanh Nguyen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839510}
}