[Mlir-commits] [mlir] [mlir][vector][nfc] Add clarification on "dim-1" bcast (PR #125425)
Andrzej Warzyński
llvmlistbot at llvm.org
Mon Feb 10 07:47:02 PST 2025
banach-space wrote:
> I see dim-1 and I immediately think "implicit" broadcasting.
Ha, what's "implicit" broadcasting ? :)
I sense that there's many different things "hiding" behind the term "broadcasting" and, without strict definitions, we tend to interpret them differently. Here's e.g. [isBroadcasted](https://github.com/llvm/llvm-project/blob/b1a267e1b9e9b50ba5b99de014ed056bf201b762/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp#L3439-L3447) in Linalg that I find a bit .. misleading.
Anyway, this is why I wanted to clarify "dim-1" broadcasting and hence this PR.
> Just want to be sure we have not introduced any form of "implicit" broadcasting?
I am not aware of any, but you will obviously be aware of recent changes to Linalg and the fact that we are allowing "broadcasts" in affine maps, see e.g. [linalg.contract](https://github.com/llvm/llvm-project/blob/b1a267e1b9e9b50ba5b99de014ed056bf201b762/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td#L733-L743).
As for other cases, I'd normally look for tests in "invalid.mlir", but not sure what to look for 😅 (i.e., what would qualify as "implicit"?)
https://github.com/llvm/llvm-project/pull/125425
More information about the Mlir-commits
mailing list