Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize Onnx parsing #3563

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Resize Onnx parsing #3563

wants to merge 4 commits into from

Conversation

bpickrel
Copy link
Contributor

@bpickrel bpickrel commented Oct 28, 2024

The old logic stepped through the args list in order, then assumed the first float-type input was the "Scales". This led to an error in an obscure case where the "ROIs" input, which is not supported by MigraphX, was not left empty and was thereby misinterpreted.

Changed logic to simply refer to the inputs by array reference; means we're allowed to assume that positional inputs all exist even if they're given as blank '' quotes.

Updated a few parsing tests to include correct blank positional inputs.

The reason for the older args parsing was apparently an effort to cover the fact that Resize requires one but not both of inputs scales and sizes which are of different types, and someone thought that positional arguments could not be guaranteed.

@bpickrel bpickrel self-assigned this Oct 28, 2024
@bpickrel bpickrel requested a review from pfultz2 October 28, 2024 18:56
@bpickrel bpickrel changed the title Changed the way Resize Onnx parser iterates the args list Resize Onnx parsing Oct 28, 2024
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.14%. Comparing base (3c3d007) to head (f38b449).
Report is 18 commits behind head on develop.

Files with missing lines Patch % Lines
src/onnx/parse_resize.cpp 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3563      +/-   ##
===========================================
- Coverage    92.16%   92.14%   -0.03%     
===========================================
  Files          512      512              
  Lines        21401    21422      +21     
===========================================
+ Hits         19724    19739      +15     
- Misses        1677     1683       +6     

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

@bpickrel bpickrel marked this pull request as ready for review November 5, 2024 19:32
@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
f38b44
Rate old
624c8d
Diff Compare
torchvision-resnet50 64 3,258.31 3,261.20 -0.09%
torchvision-resnet50_fp16 64 6,984.25 6,993.71 -0.14%
torchvision-densenet121 32 2,439.47 2,437.35 0.09%
torchvision-densenet121_fp16 32 4,077.44 4,089.44 -0.29%
torchvision-inceptionv3 32 1,638.59 1,638.48 0.01%
torchvision-inceptionv3_fp16 32 2,763.77 2,760.60 0.11%
cadene-inceptionv4 16 776.39 775.82 0.07%
cadene-resnext64x4 16 811.63 811.91 -0.03%
slim-mobilenet 64 7,534.67 7,537.37 -0.04%
slim-nasnetalarge 64 211.47 211.47 0.00%
slim-resnet50v2 64 3,505.85 3,506.85 -0.03%
bert-mrpc-onnx 8 1,148.18 1,148.60 -0.04%
bert-mrpc-tf 1 463.27 467.67 -0.94%
pytorch-examples-wlang-gru 1 435.83 493.52 -11.69% 🔴
pytorch-examples-wlang-lstm 1 400.41 389.72 2.74%
torchvision-resnet50_1 1 757.74 771.08 -1.73%
cadene-dpn92_1 1 396.75 403.25 -1.61%
cadene-resnext101_1 1 382.47 383.53 -0.28%
onnx-taau-downsample 1 343.07 342.95 0.04%
dlrm-criteoterabyte 1 33.34 33.36 -0.07%
dlrm-criteoterabyte_fp16 1 52.75 52.78 -0.06%
agentmodel 1 8,420.41 8,580.01 -1.86%
unet_fp16 2 58.99 58.67 0.55%
resnet50v1_fp16 1 950.47 930.71 2.12%
resnet50v1_int8 1 1,018.98 1,019.34 -0.04%
bert_base_cased_fp16 64 1,171.45 1,170.82 0.05%
bert_large_uncased_fp16 32 363.41 363.52 -0.03%
bert_large_fp16 1 200.30 200.64 -0.17%
distilgpt2_fp16 16 2,200.93 2,199.21 0.08%
yolov5s 1 539.29 533.96 1.00%
tinyllama 1 43.45 43.46 -0.04%
vicuna-fastchat 1 176.28 172.88 1.96%
whisper-tiny-encoder 1 418.93 418.56 0.09%
whisper-tiny-decoder 1 428.00 426.37 0.38%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator


     ✅ bert-mrpc-onnx: PASSED: MIGraphX meets tolerance

     ✅ bert-mrpc-tf: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance

     ✅ torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-dpn92_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-resnext101_1: PASSED: MIGraphX meets tolerance

     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

     ✅ unet: PASSED: MIGraphX meets tolerance

     ✅ resnet50v1: PASSED: MIGraphX meets tolerance

     ✅ bert_base_cased_fp16: PASSED: MIGraphX meets tolerance

🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ bert_large: PASSED: MIGraphX meets tolerance

     ✅ yolov5s: PASSED: MIGraphX meets tolerance

     ✅ tinyllama: PASSED: MIGraphX meets tolerance

     ✅ vicuna-fastchat: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-encoder: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-decoder: PASSED: MIGraphX meets tolerance

     ✅ distilgpt2_fp16: PASSED: MIGraphX meets tolerance

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.

2 participants