[Mlir-commits] [mlir] [MLIR][Linalg] Introduce broadcast/transpose semantic to 'linalg.batc… (PR #122275)
Adam Siemieniuk
llvmlistbot at llvm.org
Tue Jan 21 02:04:15 PST 2025
================
@@ -906,6 +907,15 @@ struct RankReduceContractionOps : OpRewritePattern<FromOpTy> {
LogicalResult matchAndRewrite(FromOpTy contractionOp,
PatternRewriter &rewriter) const override {
+ // Check to not let go the batch_matmul with extended semantic, through this
+ // transform.
+ if (std::is_same<FromOpTy, BatchMatmulOp>::value ||
+ std::is_same<FromOpTy, MatmulOp>::value) {
+ if (contractionOp.hasUserDefinedMaps()) {
----------------
adam-smnk wrote:
Just thinking now, could the matcher reject any op that has user defined maps?
It would be safer in case more ops are added with custom maps.
https://github.com/llvm/llvm-project/pull/122275
More information about the Mlir-commits
mailing list