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

added set_bypass() call #3116

Merged
merged 9 commits into from
May 28, 2024
Merged

added set_bypass() call #3116

merged 9 commits into from
May 28, 2024

Conversation

bpickrel
Copy link
Contributor

@bpickrel bpickrel commented May 23, 2024

Bug fix: added a set_bypass() call that was missing from the reduce_reshape variant of the rewrite_reshapes pass in fusion reduction (the other variants already have it). This sets a flag to prevent the created module from being fused again (i.e. subsequent compiler passes that see the flag skip over the module), which could lead to an exception because it would try to create a fused_reduce instruction with an invalid argument list. Closes Issue #3033

@bpickrel bpickrel added bugfix Fixes a bug found in the code. TorchMIGraphX labels May 23, 2024
@bpickrel bpickrel self-assigned this May 23, 2024
Copy link
Collaborator

@pfultz2 pfultz2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

@pfultz2
Copy link
Collaborator

pfultz2 commented May 23, 2024

For the other reviewers, adding the extra check in fused_reduce operator will get coverage for this issue with the current unit tests, so there is no need to write a new unit test.

Also its very likely such unit test would be removed in the future, which I dont have time to explain now.

@bpickrel
Copy link
Contributor Author

bpickrel commented May 23, 2024

Don't be too quick! The change broke an existing test, which I'm working on now. So we have code coverage whether we want it or not.

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.82%. Comparing base (76d1c14) to head (d8567c0).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3116   +/-   ##
========================================
  Coverage    91.82%   91.82%           
========================================
  Files          486      486           
  Lines        18991    18994    +3     
========================================
+ Hits         17438    17441    +3     
  Misses        1553     1553           

☔ 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 May 23, 2024 18:36
@bpickrel bpickrel requested a review from causten as a code owner May 23, 2024 18:36
@migraphx-bot
Copy link
Collaborator

migraphx-bot commented May 23, 2024

Test Batch Rate new
4bdb66
Rate old
bceef1
Diff Compare
torchvision-resnet50 64 1,713.92 1,712.95 0.06%
torchvision-resnet50_fp16 64 3,809.57 3,811.61 -0.05%
torchvision-densenet121 32 1,451.91 1,458.96 -0.48%
torchvision-densenet121_fp16 32 2,432.13 2,432.65 -0.02%
torchvision-inceptionv3 32 882.93 883.89 -0.11%
torchvision-inceptionv3_fp16 32 1,380.40 1,381.08 -0.05%
cadene-inceptionv4 16 407.08 408.06 -0.24%
cadene-resnext64x4 16 413.75 413.67 0.02%
slim-mobilenet 64 3,822.24 3,824.46 -0.06%
slim-nasnetalarge 64 97.02 97.02 0.00%
slim-resnet50v2 64 1,651.48 1,651.41 0.00%
bert-mrpc-onnx 8 590.45 589.10 0.23%
bert-mrpc-tf 1 288.34 288.10 0.08%
pytorch-examples-wlang-gru 1 335.51 300.11 11.80% 🔆
pytorch-examples-wlang-lstm 1 298.63 265.42 12.51% 🔆
torchvision-resnet50_1 1 431.00 437.05 -1.38%
cadene-dpn92_1 1 243.70 243.98 -0.11%
cadene-resnext101_1 1 187.43 189.16 -0.91%
onnx-taau-downsample 1 204.07 204.02 0.02%
dlrm-criteoterabyte 1 21.84 22.24 -1.78%
dlrm-criteoterabyte_fp16 1 40.74 41.43 -1.68%
agentmodel 1 6,069.77 6,319.63 -3.95% 🔴
unet_fp16 2 33.70 33.77 -0.20%
resnet50v1_fp16 1 522.56 549.27 -4.86% 🔴
resnet50v1_int8 1 462.42 456.03 1.40%
bert_base_cased_fp16 64 620.62 620.67 -0.01%
bert_large_uncased_fp16 32 193.76 193.76 0.00%
bert_large_fp16 1 104.05 103.76 0.28%
distilgpt2_fp16 16 1,187.96 1,186.96 0.08%
yolov5s 1 297.41 298.20 -0.27%
tinyllama 1 23.34 23.32 0.08%
vicuna-fastchat 1 133.12 133.50 -0.29%
whisper-tiny-encoder 1 241.33 240.87 0.19%
whisper-tiny-decoder 1 245.66 245.38 0.12%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented May 23, 2024


     ✅ 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

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.82%. Comparing base (2dcca47) to head (4bdb666).
Report is 156 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3116   +/-   ##
========================================
  Coverage    91.82%   91.82%           
========================================
  Files          486      486           
  Lines        18990    18993    +3     
========================================
+ Hits         17437    17440    +3     
  Misses        1553     1553           

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

@causten causten merged commit 78f55ed into develop May 28, 2024
22 checks passed
@causten causten deleted the bypass_in_fuse_reduce branch May 28, 2024 14:14
@causten causten linked an issue May 28, 2024 that may be closed by this pull request
lajagapp pushed a commit to lajagapp/AMDMIGraphX that referenced this pull request Jul 8, 2024
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. TorchMIGraphX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MI300 benchmark: No configs to tune
7 participants