mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
[MLIR][Tensor] Remove assert in PadOp builder
The assert is misplaced as the result type is allowed to be null. A few lines below the result type is inferred if it is passed a nullptr. Besides, this behavior is described in the documentation of the builder. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D136262
This commit is contained in:
@@ -2407,7 +2407,6 @@ void PadOp::build(OpBuilder &b, OperationState &result, Type resultType,
|
||||
Value source, ArrayRef<OpFoldResult> low,
|
||||
ArrayRef<OpFoldResult> high, bool nofold,
|
||||
ArrayRef<NamedAttribute> attrs) {
|
||||
assert(resultType.isa<RankedTensorType>());
|
||||
auto sourceType = source.getType().cast<RankedTensorType>();
|
||||
SmallVector<Value, 4> dynamicLow, dynamicHigh;
|
||||
SmallVector<int64_t, 4> staticLow, staticHigh;
|
||||
|
||||
Reference in New Issue
Block a user