[PATCH] D79271: [mlir][Linalg] Mostly NFC - Refactor Linalg patterns and transformations.

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 08:32:42 PDT 2020


ftynse added a comment.

In D79271#2016113 <https://reviews.llvm.org/D79271#2016113>, @bondhugula wrote:

> I'm happy to see this revision. I had exactly the same impression on DRR when it was being proposed for scheduling purposes - it's really not a fit, and in many ways goes backward from scheduling constructs written in C++ or other approaches.


+1.

> On a note related to this revision, the affine dialect has a number of standalone utilities to perform composable transformations - these can't be used from inside a pattern rewriter because some of them erase and insert ops and these are disallowed in/break the pattern rewriting framework. How do you propose to deal with that issue in the linalg world? It's common to any approach that's making "more than local" transformations and "local" SSA transformations which is what rewrite rules are designed for and excel in the LLVM world.

FWIW, I think many of the affine utilities can be written using the pattern rewriting framework (possibly by extending the framework a bit, but we've made progress): inserting and erasing ops is fine as long as you do so using a rewriter instance. However, they may compose poorly within a single call to the rewrite engine and need to be more staged.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79271/new/

https://reviews.llvm.org/D79271





More information about the llvm-commits mailing list