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

Remove list initialization for prefix_scan_sum #2828

Merged
merged 8 commits into from
Mar 7, 2024
Merged

Conversation

TedThemistokleous
Copy link
Collaborator

This seems to cause an error as seen in : https://ontrack-internal.amd.com/browse/SWDEV-443633

Issue with using list initialization for inputs in the compute shape function of prefix_scan_sum.

related to #2827

This seems to cause an error as seeing in JIRA SWDEV-443633
@TedThemistokleous TedThemistokleous added bugfix Fixes a bug found in the code. high priority A PR with high priority for review and merging. labels Feb 23, 2024
@TedThemistokleous TedThemistokleous linked an issue Feb 23, 2024 that may be closed by this pull request
@pfultz2
Copy link
Collaborator

pfultz2 commented Feb 23, 2024

I think it would be better to make the shape(const std::vector<shape>& subs) explicit, that might fix the issue which seems due to implicit conversions.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.64%. Comparing base (5d6196a) to head (2e3f19d).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2828      +/-   ##
===========================================
- Coverage    91.64%   91.64%   -0.01%     
===========================================
  Files          472      472              
  Lines        17848    17881      +33     
===========================================
+ Hits         16357    16387      +30     
- Misses        1491     1494       +3     

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

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented Feb 23, 2024

Test Batch Rate new
718175
Rate old
e57fcd
Diff Compare
torchvision-resnet50 64 3,035.35 3,030.45 0.16%
torchvision-resnet50_fp16 64 7,052.98 7,048.49 0.06%
torchvision-densenet121 32 2,443.21 2,443.36 -0.01%
torchvision-densenet121_fp16 32 4,131.93 4,119.95 0.29%
torchvision-inceptionv3 32 1,652.37 1,652.86 -0.03%
torchvision-inceptionv3_fp16 32 2,615.36 2,618.44 -0.12%
cadene-inceptionv4 16 775.71 777.23 -0.19%
cadene-resnext64x4 16 744.80 744.93 -0.02%
slim-mobilenet 64 6,714.96 6,718.05 -0.05%
slim-nasnetalarge 64 173.95 174.17 -0.13%
slim-resnet50v2 64 2,955.71 2,958.91 -0.11%
bert-mrpc-onnx 8 1,002.83 1,002.64 0.02%
bert-mrpc-tf 1 416.17 425.71 -2.24%
pytorch-examples-wlang-gru 1 314.67 313.97 0.23%
pytorch-examples-wlang-lstm 1 265.42 271.66 -2.30%
torchvision-resnet50_1 1 785.98 724.69 8.46% 🔆
cadene-dpn92_1 1 431.10 428.02 0.72%
cadene-resnext101_1 1 364.69 364.01 0.19%
onnx-taau-downsample 1 349.28 349.39 -0.03%
dlrm-criteoterabyte 1 28.43 28.42 0.06%
dlrm-criteoterabyte_fp16 1 49.12 49.17 -0.10%
agentmodel 1 4,915.60 4,078.59 20.52% 🔆
unet_fp16 2 55.27 55.18 0.17%
resnet50v1_fp16 1 950.07 894.72 6.19% 🔆
resnet50v1_int8 1 817.78 816.48 0.16%
bert_base_cased_fp16 64 952.34 952.68 -0.04%
bert_large_uncased_fp16 32 308.38 308.50 -0.04%
bert_large_fp16 1 nan nan nan%
distilgpt2_fp16 16 1,775.40 1,776.50 -0.06%
yolov5s 1 524.47 521.95 0.48%
tinyllama 1 43.92 43.91 0.03%
vicuna-fastchat 1 177.82 174.87 1.69%
whisper-tiny-encoder 1 383.17 383.99 -0.21%
whisper-tiny-decoder 1 411.49 410.01 0.36%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented Feb 23, 2024


❌bert-mrpc-onnx: ERROR - check error outputTraceback (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


     ✅ 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: ERROR - check error output2024-03-06 19:59:15.933647857 [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-03-06 19:59:15.944626750 [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 ''


     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

❌unet: ERROR - check error outputTraceback (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


     ✅ 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: ERROR - check error outputTraceback (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


     ✅ 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

Requied to change other parts of the code to handle this. Solves issue we were seeing with clang and our multinomial test.
@TedThemistokleous TedThemistokleous marked this pull request as ready for review February 27, 2024 00:34
@TedThemistokleous TedThemistokleous self-assigned this Feb 27, 2024
src/shape.cpp Outdated Show resolved Hide resolved
@causten causten merged commit 81a558d into develop Mar 7, 2024
38 of 42 checks passed
@causten causten deleted the fix_SWDEV-443633 branch March 7, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug found in the code. high priority A PR with high priority for review and merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix for prefix_sum
5 participants