Previous | Next --- Slide 62 of 66
Back to Lecture Thumbnails
dhua

What is "maxfilter" and why did the expert programmers beat the auto-scheduler in this case but not the other two cases?

kayvonf

maxfilter computes the maximum-brightness pixel within a circular region around each target pixel. (The implementation uses a precomputed table of to reduce complexity from O(radius^2) per output pixel to O(radius).)

Will get back to you in a second as to what the human did that the automatic scheduling algorithm did not.

kayvonf

Ah right. This is a situation where the human schedule performed a global reordering of the loops that we know is a good idea, but the transformation in question is not yet implemented in the compiler. The compiler's heuristics for scheduling the program detected that the particular transform the human did would be applicable, but the optimization to generate the right schedule in this case has not been implemented.

temmie

So the compiler can detect a potential way to improve performance, but can't yet correctly restructure the program to take advantage of it? That's still pretty useful, if the compiler can somehow notify the programmer of the strategy and leave them to implement it.