ROCm / AMDMIGraphX

AMD's graph optimization engine.
https://rocm.docs.amd.com/projects/AMDMIGraphX/en/latest/
MIT License
185 stars 86 forks source link

Resize Onnx parsing #3563

Open bpickrel opened 2 weeks ago

bpickrel commented 2 weeks ago

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.

codecov[bot] commented 2 weeks ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

This build is not recommended to merge :red_circle:

migraphx-bot commented 1 week ago


     :white_check_mark: bert-mrpc-onnx: PASSED: MIGraphX meets tolerance
     :white_check_mark: bert-mrpc-tf: PASSED: MIGraphX meets tolerance
     :white_check_mark: pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance
     :white_check_mark: pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance
     :white_check_mark: torchvision-resnet50_1: PASSED: MIGraphX meets tolerance
     :white_check_mark: cadene-dpn92_1: PASSED: MIGraphX meets tolerance
     :white_check_mark: cadene-resnext101_1: PASSED: MIGraphX meets tolerance
     :white_check_mark: dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance
     :white_check_mark: agentmodel: PASSED: MIGraphX meets tolerance
     :white_check_mark: unet: PASSED: MIGraphX meets tolerance
     :white_check_mark: resnet50v1: PASSED: MIGraphX meets tolerance
     :white_check_mark: bert_base_cased_fp16: PASSED: MIGraphX meets tolerance
:red_circle:bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output

     :white_check_mark: bert_large: PASSED: MIGraphX meets tolerance
     :white_check_mark: yolov5s: PASSED: MIGraphX meets tolerance
     :white_check_mark: tinyllama: PASSED: MIGraphX meets tolerance
     :white_check_mark: vicuna-fastchat: PASSED: MIGraphX meets tolerance
     :white_check_mark: whisper-tiny-encoder: PASSED: MIGraphX meets tolerance
     :white_check_mark: whisper-tiny-decoder: PASSED: MIGraphX meets tolerance
     :white_check_mark: distilgpt2_fp16: PASSED: MIGraphX meets tolerance