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 rocmlir unsupported reduce types #3766

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dhernandez0
Copy link

We are going to enable f16 for reduce in this rocmlir PR: ROCm/rocMLIR#1722

However, the code here assumes bf16 and fp8 are supported and that's not the case.

type_t::fp8e5m2fnuz_type,
type_t::fp8e4m3fn_type,
type_t::fp8e5m2_type};
type_t::half_type};
Copy link
Member

Choose a reason for hiding this comment

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

These would require tests in test/verify/ section

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.24%. Comparing base (720bc53) to head (bc8c548).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3766   +/-   ##
========================================
  Coverage    92.24%   92.24%           
========================================
  Files          519      519           
  Lines        22170    22170           
========================================
  Hits         20450    20450           
  Misses        1720     1720           

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

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
bc8c54
Rate old
150105
Diff Compare
torchvision-resnet50 64 3,254.65 3,254.33 0.01%
torchvision-resnet50_fp16 64 6,927.69 6,927.70 -0.00%
torchvision-densenet121 32 2,456.27 2,454.03 0.09%
torchvision-densenet121_fp16 32 4,182.41 4,166.00 0.39%
torchvision-inceptionv3 32 1,630.77 1,630.12 0.04%
torchvision-inceptionv3_fp16 32 2,718.89 2,716.54 0.09%
cadene-inceptionv4 16 763.85 763.13 0.09%
cadene-resnext64x4 16 813.04 813.13 -0.01%
slim-mobilenet 64 7,458.03 7,460.93 -0.04%
slim-nasnetalarge 64 208.67 208.67 -0.00%
slim-resnet50v2 64 3,446.42 3,446.18 0.01%
bert-mrpc-onnx 8 1,150.08 1,146.26 0.33%
bert-mrpc-tf 1 485.92 481.46 0.93%
pytorch-examples-wlang-gru 1 489.18 470.60 3.95% 🔆
pytorch-examples-wlang-lstm 1 452.12 443.44 1.96%
torchvision-resnet50_1 1 804.17 804.59 -0.05%
cadene-dpn92_1 1 427.59 430.86 -0.76%
cadene-resnext101_1 1 385.88 386.12 -0.06%
onnx-taau-downsample 1 372.90 372.92 -0.01%
dlrm-criteoterabyte 1 33.33 33.33 -0.02%
dlrm-criteoterabyte_fp16 1 52.63 52.63 0.00%
agentmodel 1 8,421.69 8,589.15 -1.95%
unet_fp16 2 58.49 58.37 0.21%
resnet50v1_fp16 1 1,004.27 1,036.76 -3.13% 🔴
resnet50v1_int8 1 1,027.73 1,039.07 -1.09%
bert_base_cased_fp16 64 1,181.37 1,182.01 -0.05%
bert_large_uncased_fp16 32 365.26 365.27 -0.00%
bert_large_fp16 1 199.01 202.67 -1.81%
distilgpt2_fp16 16 2,227.57 2,227.86 -0.01%
yolov5s 1 530.50 523.22 1.39%
tinyllama 1 43.64 43.57 0.16%
vicuna-fastchat 1 175.55 173.92 0.94%
whisper-tiny-encoder 1 416.90 418.33 -0.34%
whisper-tiny-decoder 1 433.06 430.88 0.51%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator


     ✅ 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

@dhernandez0
Copy link
Author

dhernandez0 commented Jan 20, 2025

By the way, reduce f16 should not be enabled for navi. As it does not support atomic_add with packed_f16, so it would be slow. Leaving this comment here for whoever is assigned the PR. @causten

@CharlieL7
Copy link
Collaborator

What's the status on this PR? Is there additional work needed or is the removal of the allowed types the only thing that needs review?

@dhernandez0
Copy link
Author

dhernandez0 commented Jan 21, 2025

What's the status on this PR? Is there additional work needed or is the removal of the allowed types the only thing that needs review?

I thought this was all that needed to be done, so I created the PR. However, we need some tests and make sure reduce f16 is not enabled for Navi (except for gfx12). I think @causten will assign somebody from migraphx team to finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants