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

Cullen Rhodes llvmlistbot at llvm.org
Thu Apr 18 07:29:44 PDT 2024


c-rhodes wrote:

> LGTM, thanks Cullen!
> 
> I suggest that we generalise this a bit and allow 2 variants:
> 
>     1. `linalg.matmul(A, B)` --> `linalg.transpose(A) + linalg.matmul_tranpose_a(A, B)`
> 
>     2. `linalg.matmul(A, B)` --> `linalg.transpose(B) + linalg.matmul_tranpose_b(A, B)`
> 
> 
> Otherwise this transformation would only be beneficial for platforms lowering `linalg.matmul` to outer-products (e.g. ArmSME). We should keep it more general.

Thanks Andrzej. I've added a flag to control which input gets transposed.

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


More information about the Mlir-commits mailing list