[Mlir-commits] [mlir] [mlir][linalg] Add pass to transpose matmul op (PR #89075)

Andrzej Warzyński llvmlistbot at llvm.org
Fri Apr 19 05:50:51 PDT 2024


banach-space wrote:

> This is a fairly straightforward pattern that can live anywhere downstream 

All our development happens **upstream** - that's specifically to make sure that our design aligns with the **upstream requirements** and overall guidelines for contributing to MLIR. Also, we want to make this compiler technology _available to everyone using MLIR core_ rather than requiring people to use forks. To this end, we are keen to adapt our design based on the comments that we receive from our reviewers - we really appreciate all the guidance and feedback 🙏🏻 

However, if this is more about "what belongs upstream" vs "what belongs downstream", then it sounds like a more general discussion on MLIR/Linalg/Vector. I am not aware of any guidelines on what qualifies for an "upstream" contribution to Linalg. If we go by "past precedence", then I feel that the examples that I shared above clearly indicate that this contribution qualifies.  Otherwise, we should probably bring this up on Discourse and see how others feel? More specifically ...

> as a one off pattern is strange

IMHO, this is very subjective. Two separate reviewers have confirmed that they'd like to use this (myself and Diego). Surely having one implementation upstream is better than having 2 or more implementations downstream?

As for ...
>  you could do it as a PDL/pdll/TD script to do this replacement as a preprocessing

... yes, every transformation can be driven in multiple ways (e.g. TD vs C++). But as Diego points out:
> I don't think we have been enforcing one alternative versus the other

AFAIK, there's no one "right" way of driving things in MLIR/Linalg. As a reviewer, I always try to be accommodating - if a certain approach works better for a particular project then we should support that. If that helps people adapt MLIR/Linalg then that's beneficial for all of us! IMHO such flexibility is crucial for the success of MLIR/Linalg.

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


More information about the Mlir-commits mailing list