Adding skip-layer-normalization operator
Based off changes via- https://github.com/ROCm/AMDMIGraphX/pull/3865
Split these out from that branch
Codecov Report
Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/onnx/parse_skip_layer_normalization.cpp | 91.30% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #3917 +/- ##
===========================================
- Coverage 92.03% 92.03% -0.00%
===========================================
Files 524 525 +1
Lines 24077 24123 +46
===========================================
+ Hits 22158 22200 +42
- Misses 1919 1923 +4
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/onnx/parse_skip_layer_normalization.cpp | 91.30% <91.30%> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
suggestion: please add tests for
skipto be a 2d or a 3d tensor (for batch==1), if not already.
That's a good idea to have tests for these. I have added both the tests. Thanks for the suggestion. @lakhinderwalia
Moving the details from description to a comment since we use description for commits to explain the changes: Based off changes via- https://github.com/ROCm/AMDMIGraphX/pull/3865
Split these out from that branch
| Test | Batch | Rate new 8d5d2e |
Rate old fea22b |
Diff | Compare |
|---|---|---|---|---|---|
| torchvision-resnet50 | 64 | 3,231.26 | 3,253.19 | -0.67% | :white_check_mark: |
| torchvision-resnet50_fp16 | 64 | 6,874.09 | 6,901.24 | -0.39% | :white_check_mark: |
| torchvision-densenet121 | 32 | 2,433.03 | 2,443.16 | -0.41% | :white_check_mark: |
| torchvision-densenet121_fp16 | 32 | 4,206.52 | 4,208.93 | -0.06% | :white_check_mark: |
| torchvision-inceptionv3 | 32 | 1,613.46 | 1,622.82 | -0.58% | :white_check_mark: |
| torchvision-inceptionv3_fp16 | 32 | 2,697.51 | 2,710.58 | -0.48% | :white_check_mark: |
| cadene-inceptionv4 | 16 | 749.15 | 754.69 | -0.73% | :white_check_mark: |
| cadene-resnext64x4 | 16 | 809.58 | 815.30 | -0.70% | :white_check_mark: |
| slim-mobilenet | 64 | 6,652.63 | 6,692.20 | -0.59% | :white_check_mark: |
| slim-nasnetalarge | 64 | 196.55 | 197.48 | -0.47% | :white_check_mark: |
| slim-resnet50v2 | 64 | 3,431.91 | 3,449.99 | -0.52% | :white_check_mark: |
| bert-mrpc-onnx | 8 | 1,142.82 | 1,150.34 | -0.65% | :white_check_mark: |
| bert-mrpc-tf | 1 | 463.22 | 464.45 | -0.26% | :white_check_mark: |
| pytorch-examples-wlang-gru | 1 | 472.07 | 478.39 | -1.32% | :white_check_mark: |
| pytorch-examples-wlang-lstm | 1 | 438.90 | 433.73 | 1.19% | :white_check_mark: |
| torchvision-resnet50_1 | 1 | 811.14 | 812.18 | -0.13% | :white_check_mark: |
| cadene-dpn92_1 | 1 | 424.97 | 422.31 | 0.63% | :white_check_mark: |
| cadene-resnext101_1 | 1 | 392.95 | 394.45 | -0.38% | :white_check_mark: |
| onnx-taau-downsample | 1 | 395.03 | 397.81 | -0.70% | :white_check_mark: |
| dlrm-criteoterabyte | 1 | 31.80 | 31.95 | -0.47% | :white_check_mark: |
| dlrm-criteoterabyte_fp16 | 1 | 50.95 | 51.01 | -0.12% | :white_check_mark: |
| agentmodel | 1 | 8,559.88 | 8,632.37 | -0.84% | :white_check_mark: |
| unet_fp16 | 2 | 58.41 | 58.61 | -0.33% | :white_check_mark: |
| resnet50v1_fp16 | 1 | 1,072.38 | 1,068.83 | 0.33% | :white_check_mark: |
| resnet50v1_int8 | 1 | 880.15 | 885.83 | -0.64% | :white_check_mark: |
| bert_base_cased_fp16 | 64 | 1,162.34 | 1,169.88 | -0.64% | :white_check_mark: |
| bert_large_uncased_fp16 | 32 | 354.18 | 355.96 | -0.50% | :white_check_mark: |
| bert_large_fp16 | 1 | 193.40 | 195.30 | -0.97% | :white_check_mark: |
| distilgpt2_fp16 | 16 | 2,215.81 | 2,230.97 | -0.68% | :white_check_mark: |
| yolov5s | 1 | 514.46 | 515.50 | -0.20% | :white_check_mark: |
| tinyllama | 1 | 43.61 | 43.85 | -0.54% | :white_check_mark: |
| vicuna-fastchat | 1 | 43.79 | 44.08 | -0.65% | :white_check_mark: |
| whisper-tiny-encoder | 1 | 411.65 | 413.06 | -0.34% | :white_check_mark: |
| whisper-tiny-decoder | 1 | 411.32 | 412.06 | -0.18% | :white_check_mark: |
| llama2_7b | 1 | nan | nan | nan% | :x: |
| qwen1.5-7b | 1 | 23.45 | 23.55 | -0.43% | :white_check_mark: |
| phi3-3.8b | 1 | nan | nan | nan% | :x: |
| mask-rcnn | 1 | 18.29 | 18.67 | -2.05% | :white_check_mark: |
| llama3-8b | 1 | 21.62 | 21.27 | 1.63% | :white_check_mark: |
| whisper-large-encoder | 1 | 10.18 | 10.22 | -0.43% | :white_check_mark: |
| whisper-large-decoder | 1 | 97.71 | 99.12 | -1.42% | :white_check_mark: |
| mistral-7b | 1 | 23.65 | 23.75 | -0.44% | :white_check_mark: |
| FLUX.1-schnell | 1 | 903.71 | 892.58 | 1.25% | :white_check_mark: |
| nan | nan | nan | nan | nan% | :x: |
This build is not recommended to merge :red_circle:
:red_circle:bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output
:x:llama2_7b: 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/llama2_7b/decoder_model.onnx:x:#qwen1.5-7b: ERROR - check error output
usage: accuracy_checker.py [-h] [--onnx ONNX] [--tf TF] [--provider PROVIDER]
[--batch BATCH] [--fill1] [--fill0] [--fp16]
[--argmax] [--verbose] [--tolerance TOLERANCE]
[--input-dim INPUT_DIM] [--target TARGET]
[--ort-run] [--ort-logging]
[--disable-offload-copy] [--disable-fast-math]
[--exhaustive_tune]
accuracy_checker.py: error: unrecognized arguments: input_ids attention_mask position_ids 1 256 @attention_mask 1 256 @position_ids 1 256:x:phi3-3.8b: 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/phi3-3.8b/model.onnx:red_circle:mask-rcnn: FAILED: MIGraphX is not within tolerance - check verbose output
:x:#whisper-large-encoder: 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/include/migraphx/op/convolution.hpp:100: normalize_compute_shape: CONVOLUTION: mismatched channel numbers