Halide (programming language)


Halide is a computer programming language designed for writing digital image processing code that takes advantage of memory locality, vectorized computation and multi-core central processing units and graphics processing units. Halide is implemented as an internal domain-specific language in C++. Halide was announced by MIT in 2012 and released in 2013.

Purpose

The main innovation Halide brings is the separation of the algorithm being implemented from its execution schedule, i.e. code specifying the loop nesting, parallelization, loop unrolling and vector instruction. These two are usually interleaved together and experimenting with changing the schedule requires the programmer to rewrite large portions of the algorithm with every change. With Halide, changing the schedule does not require any changes to the algorithm, allowing the programmer to experiment with scheduling.

Scheduled blur function

The following function defines and sets the schedule for a 3×3 box filter defined as a series of two 3×1 passes, allowing the blur algorithm to remain independent of the execution schedule.

Func blur_3x3

Uses and development

Halide was developed primarily at MIT's CSAIL lab. Both Google and Adobe have been involved in Halide research. Google uses Halide in Pixel 2's Pixel Visual Core. Adobe Photoshop also uses Halide.