We introduce the Bayesian Compiler Optimization framework (BaCO), a general purpose autotuner for modern compilers targeting CPUs, GPUs, and FPGAs. BaCO provides the flexibility needed to handle the requirements of modern autotuning tasks. Particularly, it deals with permutation, ordered, and continuous parameter types along with both known and unknown parameter constraints. To reason about these parameter types and efficiently deliver high-quality code, BaCO uses Bayesian optimiza tion algorithms specialized towards the autotuning domain. We demonstrate BaCO's effectiveness on three modern compiler systems: TACO, RISE & ELEVATE, and HPVM2FPGA for CPUs, GPUs, and FPGAs respectively. For these domains, BaCO outperforms current state-of-the-art autotuners by delivering on average 1.36x-1.56x faster code with a tiny search budget, and BaCO is able to reach expert-level performance 2.9x-3.9x faster.
翻译:我们介绍了贝叶斯编译器优化框架(BaCO),这是一种面向CPU、GPU和FPGA的通用现代编译器自动调优器。BaCO提供了处理现代自动调优任务所需的灵活性,尤其能够应对排列型、有序型和连续型参数类型,同时兼顾已知与未知的参数约束。为了对这些参数类型进行推理并高效生成高质量代码,BaCO采用了专门针对自动调优领域的贝叶斯优化算法。我们分别针对CPU、GPU和FPGA,在三种现代编译器系统(TACO、RISE & ELEVATE和HPVM2FPGA)上验证了BaCO的有效性。在这些领域中,BaCO在极小搜索预算下平均生成1.36倍至1.56倍更快的代码,性能超越现有最先进的自动调优器;同时,BaCO达到专家级性能的速度提升了2.9倍至3.9倍。