halide recursive filtering inhalide-lang.org/assets/lectures/cvpr_halide_recursivefiltering.pdf ·...
TRANSCRIPT
![Page 1: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/1.jpg)
Dillon Sharlet, Google
Recursive filtering in Halide
![Page 2: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/2.jpg)
Description
2
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
![Page 3: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/3.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
3
x =
y =
n = 0
![Page 4: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/4.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
4
x =
y =
n = 1
![Page 5: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/5.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
5
x =
y =
n = 2
![Page 6: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/6.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
6
x =
y =
n = 3
![Page 7: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/7.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
7
x =
y =
n = 4
![Page 8: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/8.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
8
x =
y =
n = 5
![Page 9: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/9.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
9
x =
y =
n = 6
![Page 10: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/10.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
10
x =
y =
n = 7
![Page 11: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/11.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
11
x =
y =
n = 8
![Page 12: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/12.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
12
x =
y =
n = 9
![Page 13: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/13.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
13
x =
y =
n = 10
![Page 14: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/14.jpg)
Description
● Recursive filter for a 1D signalyn = (1 - A) yn-1 + A xn
where x is input, y is output, A is the filter coefficient
● Example applied to a delta function
14
x =
y =
![Page 15: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/15.jpg)
Description
● To apply this recursive filter to an image, apply it four times:a. Up and down the columnsb. Right and left across the rows
15
Input
![Page 16: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/16.jpg)
Reductions● To implement this algorithm:
○ Need to reference output at previous pixel to compute current output
● This cannot be done with a pure definition● We can do this with update stages and
RDoms○ RDom (Reduction Domain) provides a serial loop○ Can have dependencies between loop iterations
16
![Page 17: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/17.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
17
Funcs can have multiple stages
We call the additional ones “update” stages
They run in sequence
Multi-stage Funcs
![Page 18: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/18.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
18
They can use arbitrary index expressions on the left-hand-side
![Page 19: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/19.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
// f(x, 0) = f(x, 0) + 5;
19
They can recursively load values defined by the previous stage
![Page 20: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/20.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
f.vectorize(x, 8);
20
They are scheduled independently
![Page 21: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/21.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
f.vectorize(x, 8);
f.update(0)
.unroll(x, 2);
21
They are scheduled independently
![Page 22: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/22.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
22
for y:
for x:
f[x,y] = x + y
![Page 23: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/23.jpg)
f(x, y) = x + y;
f(x, 0) += 5;
23
for y:
for x:
f[x,y] = x + y
for x:
f[x,0] = f[x,0] + 5;
![Page 24: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/24.jpg)
f(x, y) = x + y;
RDom r(1, 10);
f(x, 0) += f(x, r);
24
An update stage can be a reduction over some domain“RDom”
![Page 25: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/25.jpg)
f(x, y) = x + y;
RDom r(1, 10);
f(x, 0) += f(x, r);
25
This just throws an extra loop around the loop nest for that stage:
for r from 1 to 10:
for x:
f[x,0] = f[x,0] + f[x,r];
![Page 26: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/26.jpg)
f(x, y) = x + y;
RDom r(1, 10);
f(x, 0) += f(x, r);
f.update(0)
.unroll(r);
26
You can schedule RDom variables
![Page 27: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/27.jpg)
f(x, y) = x + y;
RDom r(1, 10);
f(x, 0) += f(x, r);
f.update(0)
.reorder(r, x);
27
You can schedule RDom variables
![Page 28: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/28.jpg)
f(x, y) = x + y;
RDom r(1, 10);
f(x, 0) += f(x, r);
f.update(0)
.parallel(r);
ERROR: Potential Race Condition
28
But only when we can prove there’s no race condition or change in meaning.
Halide’s promise: Scheduling never changes the results!
![Page 29: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/29.jpg)
Generators
● Two ways to call Halide code○ JIT: Halide pipelines executed in the same process
they are defined in○ AOT: Halide pipelines compiled to object files (.o, .
obj) and linked into/called from another program via C ABI (i.e. extern “C”)
29
![Page 30: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/30.jpg)
Generators● Generators are C++ programs that, when run, produce
objects (.o, .obj) and C headers (.h) containing compiled pipelines
● Applications #include generated header files declaring the functions, link to generated objects
● Pipeline functions are declared with arguments corresponding to Param objects, including ImageParams in buffer_t objects.○ Holds pointer, element size and strides of each dimension of an image○ Halide never assumes ownership of the memory a buffer_t points to
30
![Page 31: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/31.jpg)
Using Generators with Matlab● Generators can also be used within Matlab (or Octave)
via the mex library interface● Halide pipeline compiled with matlab target feature
defines a suitable mexFunction wrapper○ Validates and converts mxArray to buffer_t (or scalar params)
● mex_halide Matlab function performs all the required steps to build a mex library from a source file containing a generator
31
![Page 32: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/32.jpg)
Code!
![Page 33: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/33.jpg)
● So far, we’ve talked about some scheduling operators○ vectorize, unroll, etc.
● We’ve also briefly discussed compute_at● To significantly improve performance, we
need to use compute_at to improve locality
Scheduling for locality
![Page 34: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/34.jpg)
compute_rootHere is a simple two stage pipeline
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
![Page 35: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/35.jpg)
compute_rootThis means compute all of f, followed by all of g
Poor locality!
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_root();
g.compute_root();
![Page 36: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/36.jpg)
compute_rootfor f.y:
for f.x:
f[f.x,f.y] = f.x + f.y
for g.y:
for g.x:
g[g.x,g.y] = 2*f[g.x,g.y]
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_root();
g.compute_root();
![Page 37: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/37.jpg)
compute_at“Compute f at each iteration of y when computing g”
All stages of a Func share the same compute_at location
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_at(g, y);
g.compute_root();
![Page 38: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/38.jpg)
compute_atfor g.y:
for g.x:
g[g.x,g.y] = 2*f[g.x,g.y]
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_at(g, y);
g.compute_root();
![Page 39: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/39.jpg)
compute_atfor g.y:
for f.x:
f[f.x,g.y] = f.x + g.y
for g.x:
g[g.x,g.y] = 2*f[g.x,g.y]
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_at(g, y);
g.compute_root();
![Page 40: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/40.jpg)
compute_atfor g.y:
for g.x:
g[g.x,g.y] = 2*f[g.x,g.y]
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_at(g, x);
g.compute_root();
![Page 41: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/41.jpg)
compute_atfor g.y:
for g.x:
f[g.x,g.y] = g.x + g.y
g[g.x,g.y] = 2*f[g.x,g.y]
f(x, y) = x + y;
g(x, y) = 2*f(x, y);
f.compute_at(g, x);
g.compute_root();
![Page 42: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/42.jpg)
42
Input Blur y Transpose
ImageParam
Func
Allocation
Legend:
IIR blur compute_root visualization
Transpose Blur y
![Page 43: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/43.jpg)
43
TransposeBlur y
IIR blur locality schedule visualization
![Page 44: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/44.jpg)
44
TransposeBlur y
IIR blur locality schedule visualization
![Page 45: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/45.jpg)
45
TransposeBlur y
IIR blur locality schedule visualization
![Page 46: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/46.jpg)
46
TransposeBlur y
IIR blur locality schedule visualization
![Page 47: Halide Recursive filtering inhalide-lang.org/assets/lectures/CVPR_Halide_RecursiveFiltering.pdf · To apply this recursive filter to an image, ... Reductions To implement this algorithm:](https://reader031.vdocuments.net/reader031/viewer/2022022604/5b62c9d77f8b9a4f488dfcda/html5/thumbnails/47.jpg)
Code!https://github.com/halide/CVPR2015/tree/master/RecursiveFilter