[Mlir-commits] [mlir] b067440 - [mlir][Tensor] Dont drop attributes during tiling.

Mahesh Ravishankar llvmlistbot at llvm.org
Fri Apr 28 16:45:52 PDT 2023


Author: Mahesh Ravishankar
Date: 2023-04-28T23:45:42Z
New Revision: b06744057fc6906c682e1934ddce07a91b78a05b

URL: https://github.com/llvm/llvm-project/commit/b06744057fc6906c682e1934ddce07a91b78a05b
DIFF: https://github.com/llvm/llvm-project/commit/b06744057fc6906c682e1934ddce07a91b78a05b.diff

LOG: [mlir][Tensor] Dont drop attributes during tiling.

Reviewed By: hanchung

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp b/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
index 0ba705293ce5..c17afc77ad4c 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
@@ -617,8 +617,10 @@ FailureOr<TilingResult> tensor::bubbleUpPadSlice(OpBuilder &b,
     // Create pad(extract_slice(x)).
     Value newSliceOp = b.create<tensor::ExtractSliceOp>(
         loc, padOp.getSource(), newOffsets, newLengths, newStrides);
-    auto newPadOp = b.create<PadOp>(loc, Type(), newSliceOp, newLows, newHighs,
-                                    /*nofold=*/padOp.getNofold());
+    auto newPadOp = b.create<PadOp>(
+        loc, Type(), newSliceOp, newLows, newHighs,
+        /*nofold=*/padOp.getNofold(),
+        getPrunedAttributeList(padOp, PadOp::getAttributeNames()));
 
     // Copy region to new PadOp.
     IRMapping bvm;


        


More information about the Mlir-commits mailing list