arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1906.07181cs.LGcs.AIcs.PLstat.ML
收藏

通过神经代码融合学习执行

Learning Execution through Neural Code Fusion

The University of Texas at Austin(德克萨斯大学奥斯汀分校);Google Research(谷歌研究院)

Zhan Shi, Kevin Swersky, Daniel Tarlow, Parthasarathy Ranganathan, Milad Hashemi

摘要:

由于摩尔定律的终结,计算机系统的性能停滞不前,因此需要能够理解和优化通用代码执行的新模型。虽然有越来越多的工作使用图神经网络(GNN)来学习源代码的表示,但这些表示并不理解代码如何动态执行。在这项工作中,我们提出了一种新的方法来使用GNNs学习一般源代码及其执行的融合表示。我们的方法在源代码和程序状态的低级表示(即,汇编代码和动态存储器状态),将复杂的源代码构造和复杂的数据结构转换成更简单、更统一的格式。我们表明,这导致了性能的提高,类似的方法,不使用执行,它打开了大门,应用GNN模型的新任务,将不可行的静态代码单独。为了说明这一点,我们将新模型应用于SPEC CPU基准测试套件中具有挑战性的动态任务(分支预测和预取),分别比最先进的模型高出26%和45%。此外,我们使用学习的融合图嵌入来展示迁移学习在间接相关任务(算法分类)上的高性能。

英文摘要:

As the performance of computer systems stagnates due to the end of Moore's Law, there is a need for new models that can understand and optimize the execution of general purpose code. While there is a growing body of work on using Graph Neural Networks (GNNs) to learn representations of source code, these representations do not understand how code dynamically executes. In this work, we propose a new approach to use GNNs to learn fused representations of general source code and its execution. Our approach defines a multi-task GNN over low-level representations of source code and program state (i.e., assembly code and dynamic memory states), converting complex source code constructs and complex data structures into a simpler, more uniform format. We show that this leads to improved performance over similar methods that do not use execution and it opens the door to applying GNN models to new tasks that would not be feasible from static code alone. As an illustration of this, we apply the new model to challenging dynamic tasks (branch prediction and prefetching) from the SPEC CPU benchmark suite, outperforming the state-of-the-art by 26% and 45% respectively. Moreover, we use the learned fused graph embeddings to demonstrate transfer learning with high performance on an indirectly related task (algorithm classification).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑