[Mlir-commits] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

Quinn Dawkins llvmlistbot at llvm.org
Fri Dec 15 12:09:44 PST 2023


================
@@ -362,14 +362,21 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op,
   auto clonedOp = cast<TilingInterface>(
       cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination));
 
-  // 5b. Tile the cloned operation.
+  // 5b. Early return cloned op if tiling is not happenning.
+  if (llvm::all_of(tileSizeVector,
+                   [](OpFoldResult v) { return isZeroIndex(v); })) {
----------------
qedawkins wrote:

Does it work to just do
```
llvm::all_of(tileSizeVector, isZeroIndex)
```

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


More information about the Mlir-commits mailing list