[Mlir-commits] [mlir] [mlir] [linalg] fix failure on specializing matmul with permuted loops (PR #184294)

Renato Golin llvmlistbot at llvm.org
Tue Mar 3 06:11:01 PST 2026


rengolin wrote:

> A: (b,m,n,k) -> (m,k) //broadcasts along batch dim B: (b,m,n,k) -> (b, k,n) C: (b,m,n,k) -> (b, m,n)

Yes. Also broadcasting along the `m`, `n` and `k` dimensions for either input. Also non-batch versions. Look at the `isValidLhsRhsBroadcastMap` implementation of the `matmul` variants.

> Would this be something that should be specialized to a batch_matmul or should this be left as a generic?

Technically the `matmul` variants (as well as `contract`) can cope with those, but we can start small and expand. The actual implementation may also not be complete, so we may have to.

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


More information about the Mlir-commits mailing list