[Mlir-commits] [mlir] [mlir] Canonicalize tensor.extract_slice (linalg.fill) (PR #112619)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 17 09:59:20 PDT 2024
================
@@ -352,6 +352,20 @@ func.func @fold_fill_extract(%arg0 : i1) -> i1 {
// -----
+func.func @fold_fill_extract_slice() -> tensor<2x1920x64x66xf32> {
+ %c0 = arith.constant 0. : f32
+ %0 = tensor.empty() : tensor<2x1920x66x66xf32>
+ %1 = linalg.fill ins(%c0 : f32) outs(%0 : tensor<2x1920x66x66xf32>) -> tensor<2x1920x66x66xf32>
----------------
MaheshRavishankar wrote:
It doesnt matter. You will have two fills, one larger, and one smaller. Fills are always better I think (especially in tensor semantics).
https://github.com/llvm/llvm-project/pull/112619
More information about the Mlir-commits
mailing list