As a computer vision researcher, this looks very interesting, although somehow I have yet to understand how they want to generalize highly complicated optimization patterns (access order, locality, pipelines, platform limitations ...), especially since some algorithms (other than the shown blur filter) require quite complicated access patterns on the image data and can only be hand optimized most of the time (that do…
Since this is a language and a compiler, my guess would be the answer to your question is: the compiler will optimize for the underlying platform. The whole point of Halide is stated in their abstract: "... make it easier to write high-performance image processing code" which is the exact opposite of "hand optimization". Halide allows developers to express what to do in a powerful, domain specific language - the comp…
Halide, a language for image processing and computational photography
21–30 of 37 posts
Re: Halide, a language for image processing and computational photography
#22Really cool name. In rare case someone does not get it: http://en.wikipedia.org/wiki/Silver_halide
By coincidence, "Halide" also happens to be a Turkish female name.
Here's the most famous Halide in Turkey: http://en.wikipedia.org/wiki/Halide_Edip_Ad%C4%B1var
Re: Halide, a language for image processing and computational photography
#23I have the print version of book in my collection. It is interesting.
Re: Halide, a language for image processing and computational photography
#24[0] - http://www.imdb.com/title/tt0083658/quotes?item=qt1827458
Re: Halide, a language for image processing and computational photography
#25As usual, the Unix Room at Bell Labs already had a go at this. It was called Pico and is from 10th Ed. Unix. 1984 I have the print version of book in my collection. It is interesting. http://spinroot.com/pico/ http://spinroot.com/pico/tutorial.pdf http://spinroot.com/pico/atttj.pdf
Now, superoptimization is not a particularly new topic either (see e.g. [1]), but Halide demonstrated that improvements can be significant in this domain. Far more impressive than, e.g., superoptimization applied to generic assembly code (hasn't really worked so far), query optimization, etc.
Re: Halide, a language for image processing and computational photography
#26Re: Halide, a language for image processing and computational photography
#27Re: Halide, a language for image processing and computational photography
#28I might be a stickler here, but this strikes me as a good example of a "domain-specific language" rather than of a general programming language. Now, it's certainly possible to nail general-purpose programming features onto a DSL (e.g. matlab or R), but the approach (also used by Halide) to embed the DSL into a general-purpose language that allows you to do so (here:C++) is, in my eyes, vastly better suited for scali…
Re: Halide, a language for image processing and computational photography
#29We evaluated this some time ago in the company I used to work but it doesn't have intel compiler nor ms compiler support so it was an instant no go. Anyway it is an interesting idea.
Re: Halide, a language for image processing and computational photography
#30We evaluated this some time ago in the company I used to work but it doesn't have intel compiler nor ms compiler support so it was an instant no go. Anyway it is an interesting idea.
A fair bit of work has recently been done on making Halide work well on the Windows platform. We are erring toward requiring newer versions of Visual Studio however. (E.g. there are advantages on being able to rely on C++11 support for generating Halide code.)
I do not see any issues filed on things not working with Intel's compiler. Feel free to file one. Halide is an open source project and both bug reports and patches help a great deal.
(1) Halide can operate as either a Just In Time (JIT) compiler or an Ahead Of Time (AOT) compiler. Generally AOT is much more convenient for deploying in production. The end result of of compiling a single filter in Halide is an object file and a header file a single C-linkage function with all of its parameters passed in on the call. The minimal runtime is included in the object file and dependencies on libraries are also quite minimal, things like libc and pthreads. Functionality provided by the runtime can easily be overridden by providing one's own definitions for various functions, as weak linkage is used.
There is also a set of Python bindings, which can be used to write Halide code which is then AOT compiled. The AOT compiled object file can be linked into pretty much anything that can handle C functions either via direct linkage or a foreign function interface.