‹Programming› 2020
Mon 23 - Thu 26 March 2020 Porto, Portugal

The Halide programming language simplifies the implementation of high-performance image processing by decoupling high-level algorithms from their schedules. Although writing a high-level algorithm is straightforward in Halide, writing a low-level scheduling strategy for optimizing the performance often requires many trials-and-errors and is difficult for two reasons. First, a programmer must build a mental model of an imaginary computer that executes the algorithm with the specified scheduling strategy, which is particularly troublesome for novices. Second, predicting the computational cost of the resulting program is extremely hard given the complicated trade-offs on modern CPUs, even for expert programmers. To address these issues, we propose a live programming environment for Halide scheduling strategies that makes such a trial-and-error process instructive and interactive. The proposed system provides a graphical representation of the current scheduling strategy to aid its comprehension. Furthermore, it allows the user to update the strategy by clicking one of the possible choices generated by an automatic algorithm that enumerates valid options. To help the user decide, each choice is presented with the actual execution time and the estimated computational cost. We conducted a preliminary user study with four novice Halide programmers and confirmed that the proposed interactive environment was informative and effective for learning the optimization strategy for image processing pipelines.