[Mlir-commits] [mlir] [mlir][linalg] Add pass to transpose matmul op (PR #89075)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Apr 20 14:11:38 PDT 2024
MaheshRavishankar wrote:
> I think all those transformations are reasonably valid and should have a place upstream in the same way we have patterns that transform a matmul into an outer product, and fma a multi-reduction, some LLVM matrix intrinsics and what not. It's all a matter having certain level of optionality. Different users have different needs and I don't think each and every one of them should reinvent these patterns downstream. We have found ourselves in situations where having this optionality allowed us to quickly explore different implementation options that we initially didn't think would be optimal for our use cases.
>
This is mixing a lot of concepts. If your talking about Vector dialect, then maybe your experience and my experience is very different. The patterns there suffer from a lot of complementary options which only makes sense when put together in a narrow way. The vector dialect transformations patterns dont seem to have a coherent transformation sequence that someone can navigate for their use case. My concern is adding just one off patterns without a way to manage them effectively would just mean we end up with a whole bunch of patterns, some doing inverse of the other and "populate*" methods that no one can really navigate.
> Also, if this is needed for something like SVE (and potentially any outer product engine, really), it seems relevant enough to me to have it upstream, right?
It might be needed for SVE, but is being done on linalg level that doesnt directly map to SVE. MLIR only has a limited end to end examples. These patterns only make sense in that context, and without tying it to end-to-end examples they are just one-off and hard to rationalize on find. That is why
(a) either these live downstream, or
(b) if there is an e2e pipeline being built as an example in MLIR, then these should live scoped to these pipelines and not as a pattern somewhere in core that someone without the context of the e2e pipeline can make sense of as to "why is it here".
https://github.com/llvm/llvm-project/pull/89075
More information about the Mlir-commits
mailing list