paperbot · PL 论文追踪

全部论文 待读 收藏

P1 DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimization

DyCL:通过程序重写与图优化的动态神经网络编译
ISSTA Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis2023匹配度 6/10 · 该论文将程序分析与程序重写技术应用于深度学习编译器,以支持动态神经网络编译,属于 PL→AI 在 ML 系统中的程序分析应用,与研究方向相邻。但论文不涉及 LLM/Agentic 程序、浮点程序分析或贝叶斯程序分析,因此未命中核心问题。引用 16 inbox
Simin Chen, Shiyi Wei, Cong Liu, Wei Yang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 DyCL,通过程序重写和图优化使现有深度学习编译器成功编译动态神经网络,并提升执行性能。

现有深度学习编译器依赖运行时输入追踪来生成计算图,难以处理计算图随输入变化的动态神经网络(DyNN)。本文提出 DyCL,一种通用的动态神经网络编译方法,可在编译阶段重新分配原程序的控制流与数据流。DyCL 通过程序分析和程序变换,将动态网络拆分为多个无条件的子网络并分别编译;同时合成宿主模块,建模原网络控制流并负责调用子网络。评估显示,DyCL 对全部动态神经网络实现 100% 编译成功率,生成的可执行文件比在通用深度学习框架上运行原 DyNN 快 1.12× 到 20.21×。

问题
现有深度学习编译器依赖运行时追踪生成静态计算图,无法准确编译计算图随输入变化的动态神经网络(DyNN)。
方法
DyCL 通过程序分析与程序重写将动态网络拆分为多个无条件的子网络并分别编译,同时合成建模原控制流的宿主模块来调用子网络,并进行图优化。
评估
在多种动态神经网络上评估,DyCL 达到 100% 编译成功率,生成的可执行文件比在通用深度学习框架上执行原 DyNN 快 1.12× 到 20.21×。
原文摘要(Abstract)

The deep learning (DL) compiler serves as a vital infrastructure component to enable the deployment of deep neural networks on diverse hardware platforms such as mobile devices and Raspberry Pi. DL compiler’s primary function is to translate DNN programs written in high-level DL frameworks such as PyTorch and TensorFlow into portable executables. These executables can then be flexibly executed by the deployed host programs. However, existing DL compilers rely on a tracing mechanism, which involves feeding a runtime input to a neural network program and tracing the program execution paths to generate the computational graph necessary for compilation. Unfortunately, this mechanism falls short when dealing with modern dynamic neural networks (DyNNs) that possess varying computational graphs depending on the inputs. Consequently, conventional DL compilers struggle to accurately compile DyNNs into executable code. To address this limitation, we propose DyCL, a general approach that enables any existing DL compiler to successfully compile DyNNs. DyCL tackles the dynamic nature of DyNNs by introducing a compilation mechanism that redistributes the control and data flow of the original DNN programs during the compilation process. Specifically, DyCL develops program analysis and program transformation techniques to convert a dynamic neural network into multiple sub-neural networks. Each sub-neural network is devoid of conditional statements and is compiled independently. Furthermore, DyCL synthesizes a host module that models the control flow of the DyNNs and facilitates the invocation of the sub-neural networks. Our evaluation demonstrates the effectiveness of DyCL, achieving a 100% success rate in compiling all dynamic neural networks. Moreover, the compiled executables generated by DyCL exhibit significantly improved performance, running between 1.12× and 20.21× faster than the original DyNNs executed on general-purpose DL frameworks.

链接与引用

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

BibTeX
@inproceedings{ChenWL023,
  title = {DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimization},
  author = {Simin Chen and Shiyi Wei and Cong Liu and Wei Yang},
  booktitle = {ISSTA},
  year = {2023},
  doi = {10.1145/3597926.3598082}
}