Learning to Superoptimize Real-world Programs

Learning to Superoptimize Real-world Programs
复制标题

DOI:
--
复制
发表时间:
2021-09
期刊:
ArXiv
影响因子:
--
通讯作者:
Alex Shypula;P. Yin;Jeremy Lacomis;Claire Le Goues;Edward N. Schwartz;Graham Neubig
Alex Shypula;P. Yin;Jeremy Lacomis;Claire Le Goues;Edward N. Schwartz;Graham Neubig
中科院分区:
其他
文献类型:
--
作者:
Alex Shypula;P. Yin;Jeremy Lacomis;Claire Le Goues;Edward N. Schwartz;Graham Neubig

文献摘要

相似文献

程序优化是修改软件以更有效地执行的过程。超级茶商试图通过采用更昂贵的搜索和约束解决技术来找到最佳程序。通常,这些方法不能很好地扩展到实际开发方案中的程序,因此,超级优化在很大程度上仅限于小规模,域特异性和/或合成程序基准。在本文中,我们提出了一个框架,以学习使用神经序列到序列模型来超级优化现实世界的程序。我们创建了一个数据集,该数据集由超过25K现实世界的X86-64组装功能组成,该功能是从开源项目中挖出的,并提出了一种方法,自模仿学习以进行优化(SILO),易于实现,并且在我们的方面胜过一种标准的政策梯度学习方法数据集。与GCC版本10.3编译器的积极优化级别-O3相比,我们的方法(筒仓)超过了我们的测试集的5.9%。我们还报告说,测试集中筒仓的超速化速率是标准策略梯度方法的五倍,并且是对编译器优化演示进行预训练的模型。
Program optimization is the process of modifying software to execute more efficiently. Superoptimizers attempt to find the optimal program by employing significantly more expensive search and constraint solving techniques. Generally, these methods do not scale well to programs in real development scenarios, and as a result, superoptimization has largely been confined to small-scale, domain-specific, and/or synthetic program benchmarks. In this paper, we propose a framework to learn to superoptimize real-world programs by using neural sequence-to-sequence models. We created a dataset consisting of over 25K real-world x86-64 assembly functions mined from open-source projects and propose an approach, Self Imitation Learning for Optimization (SILO) that is easy to implement and outperforms a standard policy gradient learning approach on our dataset. Our method, SILO, superoptimizes 5.9% of our test set when compared with the gcc version 10.3 compiler's aggressive optimization level -O3. We also report that SILO's rate of superoptimization on our test set is over five times that of a standard policy gradient approach and a model pre-trained on compiler optimization demonstration.