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

Fuse transposes in pointwise and reduce fusions #3705

Merged
merged 42 commits into from
Dec 19, 2024

Conversation

pfultz2
Copy link
Collaborator

@pfultz2 pfultz2 commented Dec 11, 2024

This uses the shape_transform_descriptor to track how the axes are changed throughout the transformation. This adds method to get the common dimensions and generate operators for different points of the rewrite.

@pfultz2 pfultz2 requested a review from causten as a code owner December 11, 2024 19:48
@pfultz2 pfultz2 requested review from shivadbhavsar and TedThemistokleous and removed request for causten December 11, 2024 19:48
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 93.26425% with 13 lines in your changes missing coverage. Please review.

Project coverage is 92.17%. Comparing base (f9e276b) to head (e1a768f).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
src/shape_transform_descriptor.cpp 92.02% 13 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3705      +/-   ##
===========================================
- Coverage    92.18%   92.17%   -0.02%     
===========================================
  Files          514      514              
  Lines        21780    21891     +111     
===========================================
+ Hits         20078    20177      +99     
- Misses        1702     1714      +12     

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

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
a502b6
Rate old
6f6705
Diff Compare
torchvision-resnet50 64 3,256.53 3,257.99 -0.04%
torchvision-resnet50_fp16 64 7,002.67 6,969.89 0.47%
torchvision-densenet121 32 2,433.48 2,434.72 -0.05%
torchvision-densenet121_fp16 32 4,065.21 4,079.58 -0.35%
torchvision-inceptionv3 32 1,627.30 1,625.71 0.10%
torchvision-inceptionv3_fp16 32 2,746.69 2,744.57 0.08%
cadene-inceptionv4 16 764.29 764.53 -0.03%
cadene-resnext64x4 16 812.75 812.65 0.01%
slim-mobilenet 64 7,468.00 7,463.64 0.06%
slim-nasnetalarge 64 209.05 209.02 0.02%
slim-resnet50v2 64 3,445.62 3,438.27 0.21%
bert-mrpc-onnx 8 1,146.16 1,150.14 -0.35%
bert-mrpc-tf 1 473.35 473.42 -0.01%
pytorch-examples-wlang-gru 1 415.52 412.17 0.81%
pytorch-examples-wlang-lstm 1 391.81 393.10 -0.33%
torchvision-resnet50_1 1 775.66 790.72 -1.91%
cadene-dpn92_1 1 396.75 399.49 -0.69%
cadene-resnext101_1 1 382.25 383.53 -0.33%
onnx-taau-downsample 1 345.29 345.20 0.03%
dlrm-criteoterabyte 1 33.32 33.32 -0.01%
dlrm-criteoterabyte_fp16 1 52.72 52.75 -0.05%
agentmodel 1 8,175.55 8,373.46 -2.36%
unet_fp16 2 58.37 58.79 -0.72%
resnet50v1_fp16 1 925.29 969.89 -4.60% 🔴
resnet50v1_int8 1 1,016.74 1,031.16 -1.40%
bert_base_cased_fp16 64 1,168.79 1,170.20 -0.12%
bert_large_uncased_fp16 32 363.13 362.80 0.09%
bert_large_fp16 1 199.97 199.81 0.08%
distilgpt2_fp16 16 2,200.15 2,195.15 0.23%
yolov5s 1 532.13 534.95 -0.53%
tinyllama 1 43.37 43.65 -0.65%
vicuna-fastchat 1 173.99 174.76 -0.44%
whisper-tiny-encoder 1 417.20 417.83 -0.15%
whisper-tiny-decoder 1 428.18 425.41 0.65%

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

@causten causten merged commit a678b48 into develop Dec 19, 2024
41 of 45 checks passed
@causten causten deleted the rewrite_reshapes-shape-transform branch December 19, 2024 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Perf Improve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants