论文标题

从数据中心工作负载中学习编译器中的分支概率

Learning Branch Probabilities in Compiler from Datacenter Workloads

论文作者

Raman, Easwaran, Li, Xinliang David

论文摘要

估计进行条件分支指令的概率是一项重要分析,可以在现代编译器中进行许多优化。当使用配置文件指导优化(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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源