Skip to content

Commit

Permalink
Update resize (#2490)
Browse files Browse the repository at this point in the history
Signed-off-by: philass <[email protected]>
  • Loading branch information
philass authored Sep 11, 2023
1 parent c9a86cf commit c69721b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Builder/OpBuildTable.inc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ op_dialect_version_map_["ReduceSum"] = {13, 11};
op_dialect_version_map_["ReduceSumSquare"] = {18, 13};
op_dialect_version_map_["Relu"] = {14};
op_dialect_version_map_["Reshape"] = {19};
op_dialect_version_map_["Resize"] = {18, 13, 11, 10};
op_dialect_version_map_["Resize"] = {19, 13, 11, 10};
op_dialect_version_map_["ReverseSequence"] = {10};
op_dialect_version_map_["RoiAlign"] = {16};
op_dialect_version_map_["Round"] = {11};
Expand Down
6 changes: 4 additions & 2 deletions src/Dialect/ONNX/ONNXOps.td.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6967,8 +6967,10 @@ def ONNXResizeOp:ONNX_Op<"Resize",
let summary = "ONNX Resize operation";
let description = [{
Resize the input tensor. In general, it calculates every value in the output tensor as a weighted average of neighborhood (a.k.a. sampling locations) in the input tensor.
Each dimension value of the output tensor is: <br/>
`output_dimension = floor(input_dimension * (roi_end - roi_start) * scale)` <br/>
Each dimension value of the output tensor is:
```
output_dimension = floor(input_dimension * (roi_end - roi_start) * scale)
```
if input \\"sizes\\" is not specified.
}];
let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[BF16]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex<F32>]>, TensorOf<[Complex<F64>]>]>:$X,
Expand Down
2 changes: 1 addition & 1 deletion utils/gen_onnx_mlir.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
'ReduceSumSquare': [18, 13],
'Relu': [14],
'Reshape': [19],
'Resize': [18, 13, 11, 10],
'Resize': [19, 13, 11, 10],
'ReverseSequence': [10],
'RoiAlign': [16],
'Round': [11],
Expand Down

0 comments on commit c69721b

Please sign in to comment.