一句话:提出基于命令式张量分析的自动化重构方法,安全地将深度学习 eager 代码迁移到图执行。
问题:深度学习框架传统上采用延迟执行的符号图计算以获得效率,但开发困难、易错且难调试;命令式(eager)框架更自然却牺牲运行时性能。混合方法虽兼顾二者,但需复杂考量才能安全、准确、高效地转为图执行。方法:提出基于新型命令式张量分析的自动化重构方法,自动判断将命令式 DL 代码迁移至图执行是否安全且潜在有益,并修改装饰器参数或已在图上运行的代码。实现为 PyDev Eclipse IDE 插件,使用 WALA Ariadne 框架。结果:作为进行中的工作,目标是充分优化命令式 DL 代码,尚未报告实验评估。
Efficiency is essential to support responsiveness w.r.t. ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code-supporting symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, imperative DL frameworks encouraging eager execution have emerged at the expense of run-time performance. Though hybrid approaches aim for the “best of both worlds,” using them effectively requires subtle considerations to make code amenable to safe, accurate, and efficient graph execution. We present our ongoing work on automated refactoring that assists developers in specifying whether and how their otherwise eagerly-executed imperative DL code could be reliably and efficiently executed as graphs while preserving semantics. The approach, based on a novel imperative tensor analysis, will automatically determine when it is safe and potentially advantageous to migrate imperative DL code to graph execution and modify decorator parameters or eagerly executing code already running as graphs. The approach is being implemented as a PyDev Eclipse IDE plug-in and uses the WALA Ariadne analysis framework. We discuss our ongoing work towards optimizing imperative DL code to its full potential.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2308-11785,
title = {Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Graph Execution},
author = {Raffi Khatchadourian and Tatiana Castro Vélez and Mehdi Bagherzadeh and Nan Jia and Anita Raja},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00187}
}