[Mlir-commits] [mlir] 6f665cd - [mlir][linalg] Fix PadTensorOp constructor

Matthias Springer llvmlistbot at llvm.org
Fri Jun 18 01:40:12 PDT 2021


Author: Matthias Springer
Date: 2021-06-18T17:35:08+09:00
New Revision: 6f665cd53dfdb3a23ed10950113fd73a0f53c9e7

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

LOG: [mlir][linalg] Fix PadTensorOp constructor

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

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index b05a1477982cd..51c19136d64f5 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -898,7 +898,7 @@ void PadTensorOp::build(OpBuilder &b, OperationState &result, Value source,
                         ArrayRef<NamedAttribute> attrs) {
   auto sourceType = source.getType().cast<RankedTensorType>();
   unsigned rank = sourceType.getRank();
-  SmallVector<int64_t, 4> staticVector(ShapedType::kDynamicSize, rank);
+  SmallVector<int64_t, 4> staticVector(rank, ShapedType::kDynamicSize);
   build(b, result, source, staticVector, staticVector, low, high, attrs);
 }
 


        


More information about the Mlir-commits mailing list