[Mlir-commits] [mlir] [mlir][python] Add normalforms to capture preconditions of transforms (PR #79449)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Jan 26 05:58:58 PST 2024
martin-luecke wrote:
@joker-eph
> I'm confused, why is this a python concept?
This does not have to be a Python concept. In fact, we thought about possibly tracking the
normalform of a handle through the MLIR type of that handle.
For now, we opted to have this in a shallow frontend abstraction rather than in the dialect itself.
We want to get some mileage with this concept and see how it eases the generation of transform scripts.
That includes additional extensions to this that are harder to realize in transform core (e.g. requiring new passes or extensive changes to the transfrom core infrastructure).
For instance, I am working on a follow-up PR that introduces automatic normalization if a handle is not statically known to be in a specific normalform. The goal is to remove some of the guesswork of which canonicalizations / clean-up passes need to be applied before a specific transform.
Additionally, this design might change in the future as we learn more about it. For instance, I am not sure if modeling a hierarchy of normalforms using inheritance is strong enough to express the possible implications between a variety of normalforms in the same and across dialects.
Note that all of this is only concerned with the generation of a transform script. It does not do any analysis / transformations on existing transform IR.
In summary, we want to get some more experience with transform pre/post-conditions and introduce modeling of this in the dialect itself when we know better what aspects are key.
https://github.com/llvm/llvm-project/pull/79449
More information about the Mlir-commits
mailing list