一句话:提出面向图像处理 DSL 的融合与 tile 尺寸模型,用动态规划优化循环嵌套融合,显著提升性能。
该文针对通用及领域特定语言编译器中循环嵌套融合建模困难的问题,指出主要难点在于分组选择的组合爆炸,以及其与并行性、局部性的复杂交互。作者提出一种面向图像处理流水线高性能 DSL 编译器的融合算法,由动态规划驱动,能够探索此前方法未覆盖的融合空间,并使用比已有方法更具体、更精确地刻画优化标准的代价函数。该融合模型专门适配 PolyMage 与 Halide 所采用的变换与优化序列。作者在 PolyMage 中实现该方法,并在两种先进共享内存多核架构上评估,相比 PolyMage 借助自动调优的方法最高加速 4.32 倍,相比 Halide 的自动方法最高加速 2.46 倍。
Effective models for fusion of loop nests continue to remain a challenge in both general-purpose and domain-specific language (DSL) compilers. The difficulty often arises from the combinatorial explosion of grouping choices and their interaction with parallelism and locality. This article presents a new fusion algorithm for high-performance domain-specific compilers for image processing pipelines. The fusion algorithm is driven by dynamic programming and explores spaces of fusion possibilities not covered by previous approaches, and it is also driven by a cost function more concrete and precise in capturing optimization criteria than prior approaches. The fusion model is particularly tailored to the transformation and optimization sequence applied by PolyMage and Halide, two recent DSLs for image processing pipelines. Our model-driven technique when implemented in PolyMage provides significant improvements (up to 4.32×) over PolyMage’s approach (which uses auto-tuning to aid its model) and over Halide’s automatic approach (by up to 2.46×) on two state-of-the-art shared-memory multicore architectures.
@article{JangdaB20,
title = {An Effective Fusion and Tile Size Model for PolyMage},
author = {Abhinav Jangda and Uday Bondhugula},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {42},
number = {3},
year = {2020},
doi = {10.1145/3404846}
}