This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add extra pattern to AffineMinSCFCanonicalization
AbandonedPublic

Authored by ThomasRaoux on Mar 29 2021, 7:30 PM.

Details

Summary

Add an ad hoc pattern to canonicalize affine.min ops after doing tile and distribute.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Mar 29 2021, 7:30 PM
ThomasRaoux requested review of this revision.Mar 29 2021, 7:30 PM

It is very specific use case :) .
I am fine with this since it is probably a stop-gap solution. Ill let @nicolasvasilache decide if this lives in core.
Treat as LGTM from me, but just dont want to stamp it till I see what Nicolas has to say.

mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
523

Confusing name. The affine_min itself is not divisible. Cant suggest a better name right now.

565

Maybe make it simpler and just check that numResults() == 2?

It is very specific use case :) .
I am fine with this since it is probably a stop-gap solution. Ill let @nicolasvasilache decide if this lives in core.
Treat as LGTM from me, but just dont want to stamp it till I see what Nicolas has to say.

Thanks for looking at it. It handles a very narrow case indeed. I'll wait for @nicolasvasilache to give his opinion and I'll address the comments.

ThomasRaoux abandoned this revision.Sep 30 2021, 9:38 AM