Locality-Aware Scheduling for Stencil Code in Halide

Locality-Aware Scheduling for Stencil Code in Halide
复制标题

Halide 中模板代码的位置感知调度

DOI:
10.1109/icppw.2016.26
复制
发表时间:
2016
期刊:
2016 45th International Conference on Parallel Processing Workshops (ICPPW)
影响因子:
--
通讯作者:
C. Lo
C. Lo
中科院分区:
--
文献类型:
--
作者:
Shih;Sheng;Chieh;C. Lo

文献摘要

被引文献

相似文献

卤化物是一种针对图像处理和模具计算的特定领域的语言。现有的编程语言需要牺牲可读性,便携性和模块化,以编写高性能图像处理程序。优化程序的执行策略通常会导致代码的重大修改,这给程序员带来了负担。为了简化程序员在优化其应用程序时的任务,Halide将应用程序的时间表和算法分开。随着语言将算法和应用程序的时间表分解,可以在卤化物中独立更改程序的时间表。但是,探索可能的时间表仍然很困难且耗时。详尽的探索太常见了和蛮力。本文提出了用于模具计算的地方感知的调度程序。详尽的搜索被算法使用分析模型代替。该算法提供了重叠的平铺时间表,并选择了其瓷砖尺寸的选择。由于更好的地方,我们能够从重叠的平铺计划中实现更高的性能。在Jacobi示例中,观察到基线时间表的8个时间加速。我们在卤化物的基线计划上没有探索所有可能的时间表。
Halide is a domain-specific language designed for image processing and stencil computation. Existing programming languages require the sacrifice of readability, portability and modularity to write high-performance image processing programs. Optimizing the execution strategy of a program oftentimes results in the heavy modification of code, which is a burden to a programmer. To simplify a programmer's task in optimizing his or her application, Halide separates the schedule and the algorithm of an application. A program's schedule can be changed independently in Halide, as the language decouples the algorithm and the schedule of an application. However, the exploration of possible schedules remains difficult and time-consuming. Exhaustive exploration is too common and brute-force. This paper proposes a locality-aware scheduler for the stencil computation. Exhaustive search is replaced by an algorithm using an analytical model. The algorithm delivers the overlapped tiling schedule with its tile size selection. We are able to achieve higher performance from the overlapped tiling scheduling due to better locality. In the Jacobi example, 8-time speedup over the baseline schedule is observed. We improve over the baseline scheduling in Halide without the exploration of all possible schedules.