[Mlir-commits] [mlir] [MLIR] Add fusability query to TilingInterface (PR #166502)

Quinn Dawkins llvmlistbot at llvm.org
Tue Nov 25 20:45:12 PST 2025


================
@@ -359,6 +359,52 @@ struct LinalgOpTilingInterface
     /// Inline the op payload and store the result.
     return inlinePayload(builder, linalgOp, ivs, indexedValues);
   }
+
+  bool isOpFusableWithConsumerSlice(Operation *op, unsigned resultNumber,
+                                    ArrayRef<OpFoldResult> offsets,
+                                    ArrayRef<OpFoldResult> sizes) const {
+    return !cast<LinalgOp>(op).getShapesToLoopsMap();
----------------
qedawkins wrote:

After reading more closely, I realized ShapesToLoopsMap must exist per the verifier (I never realized that) so I just made this always true and removed the check from the other method.

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


More information about the Mlir-commits mailing list