paperbot · PL 论文追踪

全部论文 待读 收藏

P2 TelaMalloc: Efficient On-Chip Memory Allocation for Production Machine Learning Accelerators

TelaMalloc:面向生产级机器学习加速器的高效片上内存分配
ASPLOS Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 12022匹配度 3/10 · 论文聚焦 ML 加速器片上内存分配的约束优化与启发式/求解器结合,属于编译与体系结构方向,与用户的静态分析、LLM/Agent、浮点程序分析、贝叶斯程序分析等核心研究画像没有直接交集。其工业落地与问题驱动特征有一定参考价值,但整体匹配度较低。引用 36 inbox
Martin Maas, Ulysse Beaugnon, Arun Chauhan, Berkin Ilbeyi
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:结合约束优化与领域知识,用启发式搜索和求解器加速ML加速器片上内存分配,并在Pixel 6与TPUv4落地。

面向ML加速器的片上内存缓冲区分配是编译中的关键问题:分配器需为静态控制流图中已知的缓冲区选择器件内存位置,使总用量不超过片上容量;该问题高维且NP难。现有启发式难以处理复杂实例,ILP求解器方法虽能处理却代价高昂,在手机端按需编译等关键路径场景不可行。TelaMalloc结合约束优化与领域知识,用启发式搜索并由求解器指导决策,还利用ML持续改进长尾工作负载搜索。评估表明,简单输入上可媲美启发式,复杂输入上显著快于最佳ILP方法;系统已部署于Pixel 6与TPUv4,实际工作负载上分配时间相对生产ILP方法加速最高两个数量级,并支持原本无法支持的重要模型。

问题
ML加速器编译中,需为预先已知的静态控制流图分配片上内存缓冲区,使总用量不超过设备内存;该高维NP难问题在移动端按需编译等关键路径上尤其棘手。
方法
TelaMalloc将约束优化与领域知识结合,以启发式搜索为主并用求解器指导决策,同时用ML持续改进长尾工作负载的搜索。
评估
与启发式及最佳ILP求解器方法对比,在Google Pixel 6和TPUv4生产部署中,实际ML工作负载分配时间相对高度调优的生产ILP方法加速最高两个数量级,并支持原本无法支持的模型。
原文摘要(Abstract)

Memory buffer allocation for on-chip memories is a major challenge in modern machine learning systems that target ML accelerators. In interactive systems such as mobile phones, it is on the critical path of launching ML-enabled applications. In data centers, it is part of complex optimization loops that run many times and are the limiting factor for the quality of compilation results. In contrast to the traditional memory allocation problem in languages such as C++, where allocation requests dynamically arrive as the application is executing, ML systems typically execute a static control flow graph that is known in advance. The task of the memory allocator is to choose buffer locations in device memory such that the total amount of used memory never exceeds the total memory available on-device. This is a high dimensional, NP-hard optimization problem that is challenging to solve. Today, ML frameworks approach this problem either using ad-hoc heuristics or solver-based methods. Heuristic solutions work for simple cases but fail for more complex instances of this problem. Solver-based solutions can handle these more complex instances, but are expensive and impractical in scenarios where memory allocation is on the critical path, such as on mobile devices that compile models on-the-fly. We encountered this problem in the development of Google's Pixel 6 phone, where some important models took prohibitively long to compile. We introduce an approach that solves this challenge by combining constraint optimization with domain-specific knowledge to achieve the best properties of both. We combine a heuristic-based search with a solver to guide its decision making. Our approach matches heuristics for simple inputs while being significantly faster than the best Integer Linear Program (ILP) solver-based approach for complex inputs. We also show how ML can be used to continuously improve the search for the long tail of workloads. Our approach is shipping in two production systems: Google's Pixel 6 phone and TPUv4. It achieves up to two orders of magnitude allocation time speed-up on real ML workloads compared to a highly-tuned production ILP approach that it replaces and enables important real-world models that could not otherwise be supported.

链接与引用

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

BibTeX
@inproceedings{0001B0I23,
  title = {TelaMalloc: Efficient On-Chip Memory Allocation for Production Machine Learning Accelerators},
  author = {Martin Maas and Ulysse Beaugnon and Arun Chauhan and Berkin Ilbeyi},
  booktitle = {ASPLOS},
  year = {2022},
  doi = {10.1145/3567955.3567961}
}