论文标题
具有可控自动化的域可扩展编译器
A Domain-Extensible Compiler with Controllable Automation of Optimisations
论文作者
论文摘要
在高性能域,例如图像处理,物理模拟或机器学习,程序性能至关重要。称为绩效工程师的程序员负责优化程序的具有挑战性。两个主要的挑战阻止了针对异质体系结构的现代编译器可靠地自动化优化。首先,很难通过新算法和硬件所需的新优化范围扩展到特定于域的编译器,例如用于图像处理的卤化物和用于机器学习的TVM。其次,自动优化通常无法实现所需的性能,并且性能工程师通常会恢复到艰苦的手动优化。 本文显示了Shine编译器实现域扩展性,可控自动化并生成高性能代码的潜力。域扩展性有助于适应新算法和硬件。可控的自动化使绩效工程师能够逐步控制优化过程。 第一个研究贡献是将3个代码生成功能添加到Shine,即:同步屏障插入,内核执行和存储折叠。第二项研究贡献是说明如何利用可扩展性和可控性来优化标准图像处理管道以进行角落检测。最终的研究贡献是引入草图引导的平等饱和度,这是一种半自动化的技术,允许性能工程师通过将重写目标指定为草图来指导程序重写:未指定详细信息的程序模式。
In high performance domains like image processing, physics simulation or machine learning, program performance is critical. Programmers called performance engineers are responsible for the challenging task of optimising programs. Two major challenges prevent modern compilers targeting heterogeneous architectures from reliably automating optimisation. First, domain-specific compilers such as Halide for image processing and TVM for machine learning are difficult to extend with the new optimisations required by new algorithms and hardware. Second, automatic optimisation is often unable to achieve the required performance, and performance engineers often fall back to painstaking manual optimisation. This thesis shows the potential of the Shine compiler to achieve domain-extensibility, controllable automation, and generate high performance code. Domain-extensibility facilitates adapting compilers to new algorithms and hardware. Controllable automation enables performance engineers to gradually take control of the optimisation process. The first research contribution is to add 3 code generation features to Shine, namely: synchronisation barrier insertion, kernel execution, and storage folding. The second research contribution is to demonstrate how extensibility and controllability are exploited to optimise a standard image processing pipeline for corner detection. The final research contribution is to introduce sketch-guided equality saturation, a semi-automated technique that allows performance engineers to guide program rewriting by specifying rewrite goals as sketches: program patterns that leave details unspecified.