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

Find dot slice #3268

Merged
merged 7 commits into from
Jul 16, 2024
Merged

Find dot slice #3268

merged 7 commits into from
Jul 16, 2024

Conversation

umangyadav
Copy link
Member

Fixes #3267

Didn't add verify tests since they are already covered through GRU/RNN tests.

@umangyadav umangyadav requested a review from causten as a code owner July 11, 2024 18:52
@umangyadav umangyadav self-assigned this Jul 11, 2024
@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
3398b2
Rate old
9bee6a
Diff Compare
torchvision-resnet50 64 1,749.44 1,749.76 -0.02%
torchvision-resnet50_fp16 64 4,179.65 4,180.85 -0.03%
torchvision-densenet121 32 1,466.95 1,469.72 -0.19%
torchvision-densenet121_fp16 32 2,550.31 2,553.10 -0.11%
torchvision-inceptionv3 32 888.82 889.08 -0.03%
torchvision-inceptionv3_fp16 32 1,493.92 1,493.20 0.05%
cadene-inceptionv4 16 411.97 411.94 0.01%
cadene-resnext64x4 16 419.27 419.27 0.00%
slim-mobilenet 64 4,012.29 4,012.61 -0.01%
slim-nasnetalarge 64 100.97 100.99 -0.02%
slim-resnet50v2 64 1,679.25 1,680.50 -0.07%
bert-mrpc-onnx 8 616.21 616.63 -0.07%
bert-mrpc-tf 1 278.47 280.22 -0.62%
pytorch-examples-wlang-gru 1 325.97 327.78 -0.55%
pytorch-examples-wlang-lstm 1 293.11 294.63 -0.52%
torchvision-resnet50_1 1 474.46 470.91 0.75%
cadene-dpn92_1 1 247.56 247.29 0.11%
cadene-resnext101_1 1 199.52 203.73 -2.07%
onnx-taau-downsample 1 206.04 205.89 0.07%
dlrm-criteoterabyte 1 22.90 22.90 0.02%
dlrm-criteoterabyte_fp16 1 43.68 43.85 -0.39%
agentmodel 1 6,309.43 7,399.08 -14.73% 🔴
unet_fp16 2 34.28 34.30 -0.05%
resnet50v1_fp16 1 580.99 595.45 -2.43%
resnet50v1_int8 1 565.05 572.15 -1.24%
bert_base_cased_fp16 64 646.57 646.57 -0.00%
bert_large_uncased_fp16 32 198.87 198.87 0.00%
bert_large_fp16 1 116.65 116.59 0.05%
distilgpt2_fp16 16 1,211.23 1,211.13 0.01%
yolov5s 1 301.80 301.95 -0.05%
tinyllama 1 23.31 23.32 -0.06%
vicuna-fastchat 1 133.71 133.25 0.35%
whisper-tiny-encoder 1 244.34 244.12 0.09%
whisper-tiny-decoder 1 256.35 256.44 -0.03%

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

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.23%. Comparing base (9bee6a7) to head (3398b24).

Files Patch % Lines
src/simplify_algebra.cpp 97.77% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3268      +/-   ##
===========================================
+ Coverage    92.21%   92.23%   +0.01%     
===========================================
  Files          493      493              
  Lines        19725    19770      +45     
===========================================
+ Hits         18190    18234      +44     
- Misses        1535     1536       +1     

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

src/simplify_algebra.cpp Show resolved Hide resolved
Comment on lines 286 to 292
auto has_neg_vals = [](auto vec) {
return std::any_of(vec.begin(), vec.end(), [](auto i) { return i < 0; });
};
if(has_neg_vals(starts) or has_neg_vals(ends) or has_neg_vals(axes))
{
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe this should be a throw or a warning because having a negative value here would probably be a problem.

Copy link
Member Author

@umangyadav umangyadav Jul 16, 2024

Choose a reason for hiding this comment

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

We have normlize_ops pass which runs at the beginning which would convert all the neg axes to positive ones.
Therefore this case should never arise and retuning simply is okay.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it should print a warning if possible, otherwise if we mess something up wrt. normalize_ops this could be passed over without us knowing.

Copy link
Member Author

Choose a reason for hiding this comment

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

made changes to use "normalized_operator" and also enabled test for neg vals.

@causten causten merged commit 657cccb into develop Jul 16, 2024
24 of 37 checks passed
@causten causten deleted the find_dot_slice branch July 16, 2024 18:42
TedThemistokleous pushed a commit that referenced this pull request Aug 21, 2024
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.

Optimize Dot + Slice
5 participants