[mlir] [MLIR][Linalg] Introduce broadcast/transpose semantic to 'linalg.batc… (PR #122275)
Andrzej Warzyński
llvmlistbot at llvm.org
Fri Jan 24 03:59:42 PST 2025
================
@@ -3435,11 +3451,14 @@ static LogicalResult verifyExtendedMatmulSemantic(MatmulOp matmulOp,
auto opIndexingMap = opIndexingMaps[opIndex];
auto defaultIndexingMap = defaultIndexingMaps[opIndex];
// Check general validity of indexing map results.
- if (!isValidResultDimExprs(opIndexingMap, defaultIndexingMap))
+ if (!areResultExprsSubsetOf(opIndexingMap, defaultIndexingMap))
return matmulOp->emitOpError()
<< "Unexpected dim expression in map result.";
- // Check if the requested broadcast is valid.
+ // Check if the user defined map is valid broadcast map. Here broadcast
+ // indexing maps are defined in context of corresponding default indexing maps
+ // for the given Op. This way the check becomes very simple i.e just check the
+ // number of result dims.
----------------
banach-space wrote:
IMO, this comment belongs to where `isBroadcast` is declared. There's no need for a comment here.
https://github.com/llvm/llvm-project/pull/122275
More information about the Mlir-commits
mailing list