[Mlir-commits] [mlir] [mlir][linalg] Introduce transpose semantic to 'linalg.matmul' ops. (PR #104783)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 24 15:14:09 PDT 2024
================
@@ -1139,9 +1144,45 @@ int64_t LinalgOp::getIndexingMapIndex(OpOperand *opOperand) {
operandNumber - start;
}
+/// Try to verify the broadcasted type \p dst given the source type \p src for
+/// the MatmulOp \p op with broadcast semantic. Input parameter \p
+/// broadcastedDims is a map of dimensions to a pair of boolean and
+/// AffineDimExpr position, indicating broadcast and the corresponding
+/// AffineDimExpr position.
+static LogicalResult verifyBroadcastSemantic(
----------------
MaheshRavishankar wrote:
I am not sure this works in general. I think checking broadcast semantics will have to account for the indexing maps.
For example `affine_map<(d0, d1, d2) -> (d0, d1)>` and `affine_map<(d0, d1, d2) -> (d0, d2)>` are different and you wont know how to verify the shape by just considering a 2D tensor.
https://github.com/llvm/llvm-project/pull/104783
More information about the Mlir-commits
mailing list