AMDMIGraphX
AMDMIGraphX copied to clipboard
dimensions match in find_pointwise_reduce
Updates the find_pointwise_reduce
matcher in the fuse_reduce
compiler pass, to not attempt to fuse a multibroadcast
instruction if the shape has an incompatible number of dimensions (rank). This cures the exception causing a torch benchmark to fail, resolves #3007
Test | Batch | Rate new c136f5 |
Rate old 36c3eb |
Diff | Compare |
---|---|---|---|---|---|
torchvision-resnet50 | 64 | 2,959.74 | 2,960.87 | -0.04% | :white_check_mark: |
torchvision-resnet50_fp16 | 64 | 6,558.70 | 6,563.04 | -0.07% | :white_check_mark: |
torchvision-densenet121 | 32 | 2,425.27 | 2,425.42 | -0.01% | :white_check_mark: |
torchvision-densenet121_fp16 | 32 | 3,962.17 | 3,960.85 | 0.03% | :white_check_mark: |
torchvision-inceptionv3 | 32 | 1,660.91 | 1,661.60 | -0.04% | :white_check_mark: |
torchvision-inceptionv3_fp16 | 32 | 2,599.94 | 2,595.55 | 0.17% | :white_check_mark: |
cadene-inceptionv4 | 16 | 779.11 | 777.18 | 0.25% | :white_check_mark: |
cadene-resnext64x4 | 16 | 740.86 | 740.90 | -0.01% | :white_check_mark: |
slim-mobilenet | 64 | 6,917.45 | 6,920.33 | -0.04% | :white_check_mark: |
slim-nasnetalarge | 64 | 177.13 | 177.26 | -0.07% | :white_check_mark: |
slim-resnet50v2 | 64 | 2,877.35 | 2,878.57 | -0.04% | :white_check_mark: |
bert-mrpc-onnx | 8 | 1,064.90 | 1,066.24 | -0.13% | :white_check_mark: |
bert-mrpc-tf | 1 | 464.14 | 494.05 | -6.05% | :red_circle: |
pytorch-examples-wlang-gru | 1 | 432.63 | 524.81 | -17.56% | :red_circle: |
pytorch-examples-wlang-lstm | 1 | 342.71 | 519.08 | -33.98% | :red_circle: |
torchvision-resnet50_1 | 1 | 797.47 | 791.51 | 0.75% | :white_check_mark: |
cadene-dpn92_1 | 1 | 437.38 | 401.51 | 8.93% | :high_brightness: |
cadene-resnext101_1 | 1 | 366.65 | 367.36 | -0.19% | :white_check_mark: |
onnx-taau-downsample | 1 | 349.60 | 348.99 | 0.17% | :white_check_mark: |
dlrm-criteoterabyte | 1 | 33.59 | 33.54 | 0.16% | :white_check_mark: |
dlrm-criteoterabyte_fp16 | 1 | 56.62 | 56.60 | 0.04% | :white_check_mark: |
agentmodel | 1 | 7,748.81 | 7,522.70 | 3.01% | :high_brightness: |
unet_fp16 | 2 | 57.35 | 57.28 | 0.11% | :white_check_mark: |
resnet50v1_fp16 | 1 | 875.20 | 955.51 | -8.41% | :red_circle: |
resnet50v1_int8 | 1 | 778.90 | 836.30 | -6.86% | :red_circle: |
bert_base_cased_fp16 | 64 | 1,012.46 | 1,013.15 | -0.07% | :white_check_mark: |
bert_large_uncased_fp16 | 32 | 316.64 | 316.80 | -0.05% | :white_check_mark: |
bert_large_fp16 | 1 | nan | nan | nan% | :x: |
distilgpt2_fp16 | 16 | 1,992.98 | 1,993.30 | -0.02% | :white_check_mark: |
yolov5s | 1 | 515.34 | 513.06 | 0.44% | :white_check_mark: |
tinyllama | 1 | 45.03 | 44.98 | 0.13% | :white_check_mark: |
vicuna-fastchat | 1 | 178.43 | 177.15 | 0.72% | :white_check_mark: |
whisper-tiny-encoder | 1 | 405.22 | 405.22 | -0.00% | :white_check_mark: |
whisper-tiny-decoder | 1 | 426.72 | 425.41 | 0.31% | :white_check_mark: |
This build is not recommended to merge :red_circle:
:x:bert-mrpc-onnx: ERROR - check error output
Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 340, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 205, in main
model = migraphx.parse_onnx(model_name, default_dim_value=batch)
RuntimeError: /src/AMDMIGraphX/src/onnx/onnx_parser.cpp:264: parse_from: PARSE_FROM: Failed reading onnx file: /new-saved-models/huggingface-transformers/bert_mrpc1.onnx:x:cadene-resnext101_1: ERROR - check error output
2024-05-16 21:31:39.118626127 [W:onnxruntime:, model.cc:183 Model] ONNX Runtime only guarantees support for models stamped with opset version 7 or above for opset domain 'ai.onnx'. Please upgrade your model to opset 7 or higher. For now, this opset 6 model may run depending upon legacy support of some older opset version operators.
2024-05-16 21:31:39.124780041 [W:onnxruntime:, transpose_optimizer.cc:28 ApplyImpl] Transpose optimizer failed: Unsupported ONNX opset: 6
Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 340, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 267, in main
sess = ort.InferenceSession(model_name,
File "/usr/local/lib/python3.8/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/usr/local/lib/python3.8/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 463, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.NotImplemented: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for BatchNormalization(6) node with name '':x:unet: ERROR - check error output
Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 340, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 207, in main
model = migraphx.parse_onnx(model_name,
RuntimeError: /src/AMDMIGraphX/src/onnx/onnx_parser.cpp:264: parse_from: PARSE_FROM: Failed reading onnx file: /new-saved-models/unet/model.onnx:red_circle:bert_base_cased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output
:red_circle:bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output
:x:bert_large: ERROR - check error output
Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 340, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 205, in main
model = migraphx.parse_onnx(model_name, default_dim_value=batch)
RuntimeError: /src/AMDMIGraphX/src/onnx/onnx_parser.cpp:264: parse_from: PARSE_FROM: Failed reading onnx file: /new-saved-models/bert/model.onnx
Codecov Report
Attention: Patch coverage is 85.71429%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 91.82%. Comparing base (
77a5597
) to head (c136f5b
). Report is 151 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
src/fuse_reduce.cpp | 85.71% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #3038 +/- ##
========================================
Coverage 91.82% 91.82%
========================================
Files 486 486
Lines 18951 18955 +4
========================================
+ Hits 17401 17405 +4
Misses 1550 1550
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks. I made the last change Paul requested--the only remaining open conversation was just a question.
@CharlieL7 , I think I have to re-request a review to get this accepted.