HN2new | past | comments | ask | show | jobs | submitlogin
Halide: a language for image processing and computational photography (halide-lang.org)
25 points by vmorgulis on Oct 19, 2015 | hide | past | favorite | 6 comments


A Domain Specific Language for image analysis that has used GPUs as well is Diderot (http://diderot-language.cs.uchicago.edu/)

Diderot is very different from Halide though. I think Halide is for processing image data, while Diderot's interface is a much higher level of abstraction (program are written in terms of tensor fields, which Diderot then reconstructs from image data).


what's the benefit of making it a language, rather than a library?

also, fragment shader seems to be already a computational photography language.


The title does not describe well Halide. The point of Halide is to separate the logic being applied from how it is going to be executed. It is sort of like SQL that has the logic in your statement and then the RDBMS provides the execution plan. Or like Java bytecode being interpreted and then JITted. You want them separated for easy tuning and easy maintenance.

GPUs do not have the smart prefetching of CPUs, and making sure your cores are correctly fed is very difficult, yet paramount. This is really tricky in staged pipelines: do you compute each step in parallel for minimizing the number of instruction done, or do you inline steps for each pixel in order to avoid going to memory? The answer is often a carefully tuned mix of the two will get you a 10x improvement. This improvement being highly dependent on the underlying hardware.

The execution is really a moving part that is independent from the logic, and compilers do not have sufficient information to provide the right execution plan. Halide comes in and makes both the logic and execution plan first class citizens.


It's kind of a cross between the two. Halide uses a compiler to produce byte code, and has a small set of operations.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: