arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.06728cs.LGcs.PF
收藏

从数据中心工作负载中学习分支概率

Learning Branch Probabilities in Compiler from Datacenter Workloads

Google(谷歌)

Easwaran Raman, Xinliang David Li

摘要:

估计条件分支指令被执行的概率是一个重要的分析,它可以在现代编译器中实现许多优化。当使用Profile Guided Optimizations(PGO)时,编译器能够对分支概率进行很好的估计。在没有配置文件信息的情况下,编译器会为此目的使用解析法。在这项工作中,我们提出从数据中心工作负载获得的大量数据库中学习分支概率。使用度量,包括均方根误差,平均绝对误差和交叉熵,我们表明,机器学习模型提高了18-50%的分支概率估计相比,编译器并行。这意味着在40个基准测试套件中的24个上,性能提高了8.1%,在套件上有1%的几何改进。这也导致一个重要的搜索应用程序的性能提高超过1.2%。

英文摘要:

Estimating the probability with which a conditional branch instruction is taken is an important analysis that enables many optimizations in modern compilers. When using Profile Guided Optimizations (PGO), compilers are able to make a good estimation of the branch probabilities. In the absence of profile information, compilers resort to using heuristics for this purpose. In this work, we propose learning branch probabilities from a large corpus of data obtained from datacenter workloads. Using metrics including Root Mean Squared Error, Mean Absolute Error and cross-entropy, we show that the machine learning model improves branch probability estimation by 18-50% in comparison to compiler heuristics. This translates to performance improvement of up to 8.1% on 24 out of a suite of 40 benchmarks with a 1% geomean improvement on the suite. This also results in greater than 1.2% performance improvement in an important search application.

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

↑