[Mlir-commits] [mlir] [mlir] Canonicalize tensor.extract_slice (linalg.fill) (PR #112619)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 17 09:58:29 PDT 2024


================
@@ -806,6 +806,36 @@ struct FoldFillWithTensorExtract : public OpRewritePattern<tensor::ExtractOp> {
   }
 };
 
+/// Fold tensor.extract_slice(linalg.fill(<input>)) into <input>
----------------
MaheshRavishankar wrote:

I think even with multiple users it might be ok to introduce a new fill of the smaller shape. Thats an opinion though. I think all such slice propagation patterns need to be kept separate, but `fill -> slice` might be worth adding to canonicalization. 

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


More information about the Mlir-commits mailing list