Skip to content

Conversation

@ysh329
Copy link
Contributor

@ysh329 ysh329 commented Jul 31, 2025

The resize2d operator in Relax already covers the functionality, so there’s no need to introduce a dedicated upsampling op at the Relax level.

  1. Model-wise, only YOLO v3 Tiny currently uses this op, and I haven’t seen any other models that require it. The op originates from Darknet.
  2. although it becomes an ONNX Upsample op during conversion, the node name still ends with /resize.
    From ONNX version 10 onward, the Upsample op is no longer supported (This version of the operator has been deprecated since version 10. ref: https://onnx.ai/onnx/operators/onnx__Upsample.html)
  3. resize2d provides a superset of upsample (2-D) capabilities, and end-to-end model results are correct, so resize2d fully covers the need.
  4. During ONNX-to-Relay conversion, the old frontend maps the op to either upsampling or upsampling3d based on the input rank. For the 3-D case, Relax could translate upsampling3d to resize3d (TOPI already has the resze3d implementation), but Relax currently lacks a resize3d operator.

Therefore, if we ever need upsampling3d in the future, the better path would be to add the more capable resize3d operator at the Relax op level.

Copy link
Contributor

@mshr-h mshr-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to include the unit test, but it's ok to do that in a follow-up PR.

@ysh329
Copy link
Contributor Author

ysh329 commented Aug 6, 2025

Would be better to include the unit test, but it's ok to do that in a follow-up PR.

Okay

@yongwww yongwww merged commit d6c3dea into apache:main Aug 8, 2025
14 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
@ysh329 ysh329 deleted the upsample-onnx branch August 11, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants