论文标题

Terra:命令式深度学习计划的命令式符号共同执行

Terra: Imperative-Symbolic Co-Execution of Imperative Deep Learning Programs

论文作者

Kim, Taebum, Jeong, Eunji, Kim, Geon-Woo, Koo, Yunmo, Kim, Sehoon, Yu, Gyeong-In, Chun, Byung-Gon

论文摘要

命令式编程使用户可以轻松地实施其深层神经网络(DNN),并已成为最近深度学习(DL)框架的重要组成部分。最近,已经提出了一些系统,以将命令编程的可用性与符号图执行的优化性能结合在一起。这样的系统将命令的Python DL程序转换为优化符号图并执行它们。但是,它们不能完全支持命令编程的可用性。例如,如果命令式DL程序包含一个python功能,则没有相应的符号表示(例如,第三方库呼叫或不支持的动态控制流),则无法执行该程序。为了克服这一限制,我们提出了Terra,Terra是一种命令符号的共执行系统,可以处理任何命令性DL程序,同时实现符号图执行的优化性能。为了实现这一目标,Terra通过将DL操作与Python功能解耦来构建符号图。然后,Terra进行了命令执行,以支持所有Python功能,同时将脱钩的操作委托给符号执行。我们使用十个DNN体系结构的十个命令性DL计划评估了Terra的性能改善和覆盖范围。结果表明,Terra可以加快执行所有十个命令性DL程序的执行,而签名是最先进的系统之一,未能执行其中的五个。

Imperative programming allows users to implement their deep neural networks (DNNs) easily and has become an essential part of recent deep learning (DL) frameworks. Recently, several systems have been proposed to combine the usability of imperative programming with the optimized performance of symbolic graph execution. Such systems convert imperative Python DL programs to optimized symbolic graphs and execute them. However, they cannot fully support the usability of imperative programming. For example, if an imperative DL program contains a Python feature with no corresponding symbolic representation (e.g., third-party library calls or unsupported dynamic control flows) they fail to execute the program. To overcome this limitation, we propose Terra, an imperative-symbolic co-execution system that can handle any imperative DL programs while achieving the optimized performance of symbolic graph execution. To achieve this, Terra builds a symbolic graph by decoupling DL operations from Python features. Then, Terra conducts the imperative execution to support all Python features, while delegating the decoupled operations to the symbolic execution. We evaluated the performance improvement and coverage of Terra with ten imperative DL programs for several DNN architectures. The results show that Terra can speed up the execution of all ten imperative DL programs, whereas AutoGraph, one of the state-of-the-art systems, fails to execute five of them.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源