Deep learning frameworks (DLFs) have been playing an increasingly important role in this intelligence age since they act as a basic infrastructure for an increasingly wide range of AIbased applications. Meanwhile, as multi-programming-language (MPL) software systems, DLFs are inevitably suffering from bugs caused by the use of multiple programming languages (PLs). Hence, it is of paramount significance to understand the bugs (especially the bugs involving multiple PLs, i.e., MPL bugs) of DLFs, which can provide a foundation for preventing, detecting, and resolving bugs in the development of DLFs. To this end, we manually analyzed 1497 bugs in three MPL DLFs, namely MXNet, PyTorch, and TensorFlow. First, we classified bugs in these DLFs into 12 types (e.g., algorithm design bugs and memory bugs) according to their bug labels and characteristics. Second, we further explored the impacts of different bug types on the development of DLFs, and found that deployment bugs and memory bugs negatively impact the development of DLFs in different aspects the most. Third, we found that 28.6%, 31.4%, and 16.0% of bugs in MXNet, PyTorch, and TensorFlow are MPL bugs, respectively; the PL combination of Python and C/C++ is most used in fixing more than 92% MPL bugs in all DLFs. Finally, the code change complexity of MPL bug fixes is significantly greater than that of single-programming-language (SPL) bug fixes in all the three DLFs, while in PyTorch MPL bug fixes have longer open time and greater communication complexity than SPL bug fixes. These results provide insights for bug management in DLFs.
翻译:深度学习框架(DLFs)在当今智能时代发挥着日益重要的作用,它们是日益广泛的人工智能应用的基础设施。同时,作为多编程语言(MPL)软件系统,DLFs不可避免地会因多种编程语言(PLs)的使用而产生缺陷。因此,理解DLFs的缺陷(特别是涉及多种编程语言的缺陷,即MPL缺陷)具有极其重要的意义,这可以为DLFs开发过程中缺陷的预防、检测和解决提供基础。为此,我们手动分析了三个MPL DLFs(即MXNet、PyTorch和TensorFlow)中的1497个缺陷。首先,我们根据缺陷标签和特征将这些DLFs中的缺陷分为12类(例如,算法设计缺陷和内存缺陷)。其次,我们进一步探索了不同缺陷类型对DLFs开发的影响,发现部署缺陷和内存缺陷在不同方面对DLFs开发的负面影响最大。第三,我们发现MXNet、PyTorch和TensorFlow中分别有28.6%、31.4%和16.0%的缺陷是MPL缺陷;在所有DLFs中,超过92%的MPL缺陷修复最常使用Python和C/C++的编程语言组合。最后,在所有三个DLFs中,MPL缺陷修复的代码变更复杂度显著高于单编程语言(SPL)缺陷修复,而在PyTorch中,MPL缺陷修复比SPL缺陷修复具有更长的开放时间和更高的通信复杂度。这些结果为DLFs中的缺陷管理提供了见解。