Skip to content

Fix Resize reference operator#7105

Merged
justinchuby merged 4 commits intoonnx:mainfrom
xadupre:resize
Jul 23, 2025
Merged

Fix Resize reference operator#7105
justinchuby merged 4 commits intoonnx:mainfrom
xadupre:resize

Conversation

@xadupre
Copy link
Copy Markdown
Contributor

@xadupre xadupre commented Jul 3, 2025

Description

np.uint8(-2) --> 253 with is wrong for Resize

Signed-off-by: xadupre <xadupre@microsoft.com>
@xadupre xadupre requested a review from a team as a code owner July 3, 2025 13:28
@github-project-automation github-project-automation Bot moved this to In progress in PR Tracker Jul 3, 2025
Comment thread onnx/reference/ops/op_resize.py Fixed
Comment thread onnx/reference/ops/op_resize.py Fixed
Signed-off-by: xadupre <xadupre@microsoft.com>
Comment thread onnx/reference/ops/op_resize.py Outdated
@justinchuby
Copy link
Copy Markdown
Member

justinchuby commented Jul 3, 2025

We can merge the cast logic to

def saturating_cast(x: np.ndarray, dtype: np.dtype) -> np.ndarray:

(And rename the function to saturate_cast to fit the naming convention in other frameworks)

@justinchuby
Copy link
Copy Markdown
Member

@xadupre bump

@github-project-automation github-project-automation Bot moved this from In progress to Reviewer approved in PR Tracker Jul 23, 2025
@justinchuby justinchuby enabled auto-merge (squash) July 23, 2025 17:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.64%. Comparing base (e651244) to head (50df0f8).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7105   +/-   ##
=======================================
  Coverage   53.64%   53.64%           
=======================================
  Files         508      508           
  Lines       32177    32178    +1     
  Branches     2971     2971           
=======================================
+ Hits        17260    17261    +1     
  Misses      14120    14120           
  Partials      797      797           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinchuby justinchuby merged commit 35655f2 into onnx:main Jul 23, 2025
51 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in PR Tracker Jul 23, 2025
alx256 pushed a commit to alx256/onnx that referenced this pull request Aug 1, 2025
### Description
np.uint8(-2) --> 253 with is wrong for Resize

---------

Signed-off-by: xadupre <xadupre@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Alexander Poulson <alexanderipoulson@gmail.com>
MagellaX pushed a commit to MagellaX/onnx that referenced this pull request Aug 9, 2025
### Description
np.uint8(-2) --> 253 with is wrong for Resize

---------

Signed-off-by: xadupre <xadupre@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Yash solanki <alphacr792@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants