[Mlir-commits] [mlir] [mlir][linalg] Add pass to transpose matmul op (PR #89075)
Diego Caballero
llvmlistbot at llvm.org
Fri Apr 19 22:15:30 PDT 2024
dcaballe wrote:
> This is adding matmul -> transpose + matmul_transpose_a + transpose
> What about matmul -> transpose + matmul_transpose_b + transpose
> What about reverse of these (which are also reasonable) transpose + matmul_transpose_b + transpose -> matmul and other variants.
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.
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?
https://github.com/llvm/llvm-project/pull/89075
More information about the Mlir-commits
mailing list