-
Notifications
You must be signed in to change notification settings - Fork 0
Halide
Ashok Bhat edited this page Nov 6, 2020
·
6 revisions
- A language for fast, portable computation on images and tensors
- Embedded in C++
- Allows algorithm and implementation details to be separated, making to easier to tune to a platform.
- https://github.com/halide/Halide
- Aim to release new versions of Halide at the same cadence as LLVM (every six months or so)
- Version number based on LLVM version
Func halide_blur(Func in) f
Func tmp, blurred;
Var x, y, xi, yi;
// The algorithm - No storage or order
// Defines a simple 3x3 blur filter split into a blur horizontal followed by a blur vertical step
tmp(x, y) = (in(x-1, y) + in(x, y) + in(x+1, y))/3;
blurred(x, y) = (tmp(x, y-1) + tmp(x, y) + tmp(x, y+1))/3;
// The schedule -
// Specifies how the algorithm can be treated in a parallel implementation
blurred.tile(x, y, xi, yi, 256, 32).vectorize(xi, 8).parallel(y);
tmp.chunk(x).vectorize(x, 8);
return blurred;
}
- What is Halide?
- What is the key innovation?
- Where is it used?
- What does it use for underlying technology?
- Adobe for Photoshop
- Google for Pixel