paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Amanda: Unified Instrumentation Framework for Deep Neural Networks

Amanda:面向深度神经网络的统一插桩框架
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 12024匹配度 4/10 · 论文在 PL 与 ML 交叉处提出 DNN 算子级插桩框架,用于追踪、剪枝等分析优化,与在机器学习系统中应用程序分析/插桩有间接关联;但它不是静态分析,也不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户当前核心方向匹配有限。引用 3 inbox
Yue Guan, Yuxian Qiu, Jingwen Leng, Fan Yang, Shuo Yu, Yunxin Liu, Yu Feng, Yuhao Zhu, Lidong Zhou, Yun Liang, Chen Zhang, Chao Li, Minyi Guo
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出统一插桩框架 Amanda,把 DNN 的追踪、剪枝等分析优化任务抽象为算子级插桩,兼容多后端与多执行模式。

深度神经网络的分析(如 tracing)与优化(如剪枝)任务在 TensorFlow/PyTorch 等后端中各有特定需求和临时实现,开发者需应对碎片化接口并为不同模型改写代码。论文将这些任务的实现形式化为「神经网络插桩」,即在 DNN 的算子层引入插桩,从而把分析优化任务抽象为可作用于各类模型的插桩工具。Amanda 设计了两级 API:用户级 API 提供统一的算子粒度插桩接口,屏蔽不同后端差异;内部则采用以回调为中心的 API,管理并优化原始代码与插桩代码在不同后端中的执行。该设计使框架能覆盖 tracing、profiling、剪枝、量化等多种用例,跨越 TensorFlow/PyTorch 等后端以及图模式与 eager 模式,且性能开销通常控制在 5% 以内。

问题
DNN 的追踪、剖析、剪枝、量化等分析与优化任务在现有执行后端中接口碎片化、实现各自为政,开发者需为不同模型和后端反复改写代码。
方法
将这类任务统一形式化为算子级「神经网络插桩」,并实现 Amanda 框架:用户级提供统一的算子粒度插桩 API,内部采用以回调为中心的 API 管理和优化原始代码与插桩代码的执行。
评估
在 TensorFlow/PyTorch 后端以及图模式与 eager 模式下,对 tracing、profiling、剪枝、量化等用例进行验证,测量插桩带来的运行时开销。
原文摘要(Abstract)

The success of deep neural networks (DNNs) has sparked efforts to analyze (e.g., tracing) and optimize (e.g., pruning) them. These tasks have specific requirements and ad-hoc implementations in current execution backends like TensorFlow/PyTorch, which require developers to manage fragmented interfaces and adapt their codes to diverse models. In this study, we propose a new framework called Amanda to streamline the development of these tasks. We formalize the implementation of these tasks as neural network instrumentation, which involves introducing instrumentation into the operator level of DNNs. This allows us to abstract DNN analysis and optimization tasks as instrumentation tools on various DNN models. We build Amanda with two levels of APIs to achieve a unified, extensible, and efficient instrumentation design. The user-level API provides a unified operator-grained instrumentation API for different backends. Meanwhile, internally, we design a set of callback-centric APIs for managing and optimizing the execution of original and instrumentation codes in different backends. Through these design principles, the Amanda framework can accommodate a broad spectrum of use cases, such as tracing, profiling, pruning, and quantization, across different backends (e.g., TensorFlow/PyTorch) and execution modes (graph/eager mode). Moreover, our efficient execution management ensures that the performance overhead is typically kept within 5%.

链接与引用

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

BibTeX
@inproceedings{GuanQL0YLF0Z00L24,
  title = {Amanda: Unified Instrumentation Framework for Deep Neural Networks},
  author = {Yue Guan and Yuxian Qiu and Jingwen Leng and Fan Yang and Shuo Yu and Yunxin Liu and Yu Feng and Yuhao Zhu and Lidong Zhou and Yun Liang and Chen Zhang and Chao Li and Minyi Guo},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3617232.3624864}
}