Halide Talk

Channel:Andrew Adams · Length:25:51 · Published:2014-04-24 · Views:52989

Watch on YouTube

Summary

Andrew Adams, a Halide developer, presents the Halide language for image processing and tensor computation. The talk explains the separation of algorithm from schedule with illustrated examples of parallelism, locality and redundancy tradeoffs.

Why HN recommends it

Recommended as the clearest explanation of Halide's ideas and of scheduling for performance.

The best way to understand it is probably to watch the video, which is relatively long but explains things clearly — HN, 2014

Software performance & optimization · Compilers, interpreters & program analysis · Computer graphics & rendering

Subtitles (excerpt)

Hi, I'm Andrew Adams and this video is about Halide, a new language and compiler that makes it much easier to write fast image processing pipelines across a range of platforms. We're interested in the pipelines you find your camera, and PC and mobile apps like Adobe Lightroom and Instagram. The big idea of Halide is to separate the definition of the algorithms in the pipeline from the concerns of optimization, things like SIMD vectorization tiling or parallelization. This makes the algorithms much simpler, more modular, and more portable. The programmer is still responsible for choosing which optimizations to apply, but it's much easier to define and explore optimizations than in a language like C or CUDA. They're defined very tersely, independently of the algorithm, and most importantly, changing the optimizations is guaranteed not to change the result. First let's look at why existing languages are insufficient for fast image processing If we want to do a simple 3 by 3 box filter, we might write C++ code that looks like this We've decomposed the filter into a horizontal blur which reads and then averages three points from the input and then a vertical blur which reads and averages three points from

On Hacker News

This is what I was trying to get at - using column vectors gives good cache locality and lets you use SIMD for "multiply all of these by this scalar" for each column, and then for "sum all of these" for the resulting rows. I'd imagine it could also let you optimize multiplications into things like bit-shifts with minimal overhead as well, though I have no idea if that's done in practice. Maybe on… — T-R, 2021-05
[VIDEO] Here is a relevant video from the creator. It has some fun illustrations to help with what its going on. /edit - letters — all2, 2018-12
please look at [LINK] and especially [VIDEO] they seem to open new ground in the area you are prusuing edit: if you know any other groups/ppl who practice a similar approach send them my way anyhow, it seems like the hand written assembly vs compiled code goes in to a new skirmish the age where the whole spectrum from generalcpu > asic becomes available to programmers all around bottle necks of p… — whos3424, 2018-05
A really nice video with animations of various scheduling approaches for these types of linear algebra algorithms: [VIDEO] — tehsauce, 2018-05
You can see it a little bit in the blur example on the front page: the blur algorithm is described in two lines and the optimizations are described separately in the "schedule" below. In this case the schedule specifies that intermediate results should be computed in tiles of a certain size, and the whole thing is both vectorized and parallelized. The best way to understand it is probably to watc… — modeless, 2014-04

Related videos