将必要的深度学习程序迁移到图执行的挑战:一项实证研究
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution: An Empirical Study
摘要:
效率对于支持w.r.t.的响应至关重要。不断增长的数据集,特别是对于深度学习(DL)系统。深度学习框架传统上采用延迟执行风格的深度学习代码,支持符号化、基于图的深度神经网络(DNN)计算。虽然可扩展,但这样的开发往往会产生容易出错、不直观且难以调试的DL代码。因此,出现了更自然、更少出错的命令式DL框架,鼓励积极执行,但以牺牲运行时性能为代价。虽然混合方法的目标是“两全其美”,但在现实世界中应用它们的挑战在很大程度上是未知的。我们进行了一个数据驱动的分析的挑战-和由此产生的错误-参与编写可靠的,但性能的命令式DL代码通过研究250个开源项目,包括19.7 MPEG4,以及470和446手动检查的代码补丁和错误报告,分别。结果表明,混合:(i)易于API误用,(ii)可能导致性能下降-与其意图相反,(iii)由于执行模式不兼容,应用程序有限。我们提出了几个建议,最佳实践和反模式,以有效地混合命令式DL代码,可能有利于DL从业者,API设计师,工具开发人员和教育工作者。
英文摘要:
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 that supports symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development tends to produce DL code that is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, less error-prone imperative DL frameworks encouraging eager execution have emerged but at the expense of run-time performance. While hybrid approaches aim for the "best of both worlds," the challenges in applying them in the real world are largely unknown. We conduct a data-driven analysis of challenges -- and resultant bugs -- involved in writing reliable yet performant imperative DL code by studying 250 open-source projects, consisting of 19.7 MLOC, along with 470 and 446 manually examined code patches and bug reports, respectively. The results indicate that hybridization: (i) is prone to API misuse, (ii) can result in performance degradation -- the opposite of its intention, and (iii) has limited application due to execution mode incompatibility. We put forth several recommendations, best practices, and anti-patterns for effectively hybridizing imperative DL code, potentially benefiting DL practitioners, API designers, tool developers, and educators.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。