[Mlir-commits] [mlir] [mlir][linalg] Genericize MapOp (PR #162742)

Javed Absar llvmlistbot at llvm.org
Mon Oct 20 02:45:40 PDT 2025


javedabsar1 wrote:

> > A high level question - instead of changing linalg.map definition, would it not be less ruffling if instead you extended linalg-morph-ops with a pattern to rewrite linalg.map into generic?
> 
> In my opinion what you are suggesting is even more "ruffling", and I actually disagree this is ruffling anything anyway. These changes don't change the definition of map op. Nor does it have a negative impact on anything else as far as I can tell. A better question would be why have this specialization for the bbargs in the map op when all it does is make it harder to apply generic patterns that already exist? I'd like to hear one good reason to keep this specialization as is.

It was just a suggestion  - I am not married to that approach. 

Also maybe what I was suggesting is mis-understood. So let me rephrase - changing the op definition (and I assume changing ins-outs is that) , often meets resistance from folks because of impact on their pipeline. So what I was proposing was a e.g. `populateLinalgMapToGenericPattern` rewrite that takes a `linalg.map` and converts it to one or more core ops (incl. linalg-generic). `linalg.map` I have found it to be quite an odd as other ops could have been used in its place. But front-ends may generate linalg.map and so it cannot be removed easily.

I

https://github.com/llvm/llvm-project/pull/162742


More information about the Mlir-commits mailing list