当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learning
arXiv - CS - Programming Languages Pub Date : 2020-03-02 , DOI: arxiv-2003.00671
Qijing Huang, Ameer Haj-Ali, William Moses, John Xiang, Ion Stoica, Krste Asanovic, John Wawrzynek

The performance of the code a compiler generates depends on the order in which it applies the optimization passes. Choosing a good order--often referred to as the phase-ordering problem, is an NP-hard problem. As a result, existing solutions rely on a variety of heuristics. In this paper, we evaluate a new technique to address the phase-ordering problem: deep reinforcement learning. To this end, we implement AutoPhase: a framework that takes a program and uses deep reinforcement learning to find a sequence of compilation passes that minimizes its execution time. Without loss of generality, we construct this framework in the context of the LLVM compiler toolchain and target high-level synthesis programs. We use random forests to quantify the correlation between the effectiveness of a given pass and the program's features. This helps us reduce the search space by avoiding phase orderings that are unlikely to improve the performance of a given program. We compare the performance of AutoPhase to state-of-the-art algorithms that address the phase-ordering problem. In our evaluation, we show that AutoPhase improves circuit performance by 28% when compared to using the -O3 compiler flag, and achieves competitive results compared to the state-of-the-art solutions, while requiring fewer samples. Furthermore, unlike existing state-of-the-art solutions, our deep reinforcement learning solution shows promising result in generalizing to real benchmarks and 12,874 different randomly generated programs, after training on a hundred randomly generated programs.

中文翻译:

AutoPhase:使用深度强化学习处理随机森林中的 HLS 相位排序

编译器生成的代码的性能取决于它应用优化过程的顺序。选择一个好的顺序——通常被称为相序问题,是一个 NP-hard 问题。因此,现有的解决方案依赖于各种启发式方法。在本文中,我们评估了一种解决相位排序问题的新技术:深度强化学习。为此,我们实现了 AutoPhase:一个框架,它接受一个程序并使用深度强化学习来查找一系列编译通道,以最大限度地缩短其执行时间。在不失一般性的情况下,我们在 LLVM 编译器工具链的上下文中构建了这个框架,并针对高级综合程序。我们使用随机森林来量化给定传递的有效性与程序特征之间的相关性。这有助于我们通过避免不太可能提高给定程序性能的阶段排序来减少搜索空间。我们将 AutoPhase 的性能与解决相位排序问题的最先进算法进行了比较。在我们的评估中,我们表明与使用 -O3 编译器标志相比,AutoPhase 将电路性能提高了 28%,并且与最先进的解决方案相比取得了有竞争力的结果,同时需要的样本更少。此外,与现有的最先进解决方案不同,我们的深度强化学习解决方案在对 100 个随机生成的程序进行训练后,在推广到真实基准和 12,874 个不同的随机生成的程序方面显示出有希望的结果。我们将 AutoPhase 的性能与解决相位排序问题的最先进算法进行了比较。在我们的评估中,我们表明与使用 -O3 编译器标志相比,AutoPhase 将电路性能提高了 28%,并且与最先进的解决方案相比取得了有竞争力的结果,同时需要的样本更少。此外,与现有的最先进的解决方案不同,我们的深度强化学习解决方案在对 100 个随机生成的程序进行训练后,在推广到真实基准和 12,874 个不同的随机生成的程序方面显示出有希望的结果。我们将 AutoPhase 的性能与解决相位排序问题的最先进算法进行了比较。在我们的评估中,我们表明与使用 -O3 编译器标志相比,AutoPhase 将电路性能提高了 28%,并且与最先进的解决方案相比取得了有竞争力的结果,同时需要的样本更少。此外,与现有的最先进的解决方案不同,我们的深度强化学习解决方案在对 100 个随机生成的程序进行训练后,在推广到真实基准和 12,874 个不同的随机生成的程序方面显示出有希望的结果。与最先进的解决方案相比,获得了具有竞争力的结果,同时需要的样本更少。此外,与现有的最先进的解决方案不同,我们的深度强化学习解决方案在对 100 个随机生成的程序进行训练后,在推广到真实基准和 12,874 个不同的随机生成的程序方面显示出有希望的结果。与最先进的解决方案相比,获得了具有竞争力的结果,同时需要的样本更少。此外,与现有的最先进的解决方案不同,我们的深度强化学习解决方案在对 100 个随机生成的程序进行训练后,在推广到真实基准和 12,874 个不同的随机生成的程序方面显示出有希望的结果。
更新日期:2020-03-09
down
wechat
bug