[mlir][Tensor] Make `TilingInterface` implementation only return handle to the create...
authorMahesh Ravishankar <ravishankarm@google.com>
Mon, 20 Mar 2023 21:04:55 +0000 (21:04 +0000)
committerMahesh Ravishankar <ravishankarm@google.com>
Mon, 20 Mar 2023 21:23:18 +0000 (21:23 +0000)
Pad tiling implementation only needs to return the tiled pad
operation. The rest of the generated code is related to handling
boundary conditions.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D146439

mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp

index 0faa29a..cd3a6f6 100644 (file)
@@ -648,7 +648,7 @@ FailureOr<TilingResult> tensor::bubbleUpPadSlice(OpBuilder &b,
           elseOp = createPadOfExtractSlice();
           b.create<scf::YieldOp>(loc, castResult(elseOp->getResult(0)));
         });
-    return TilingResult{{result}, SmallVector<Value>(result->getResults())};
+    return TilingResult{{elseOp}, SmallVector<Value>(result->getResults())};
   }
 
   Operation *newPadOp = createPadOfExtractSlice();