-
Notifications
You must be signed in to change notification settings - Fork 86
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
Rewrite 1x1 convolutions to gemm #3568
base: develop
Are you sure you want to change the base?
Conversation
if(not all_of(v.at("dilation"), [](const value& x) { return x.to<std::size_t>() == 1; })) | ||
return false; | ||
auto w = ins->inputs().at(1)->get_shape(); | ||
return std::all_of(w.lens().begin() + 2, w.lens().end(), [](std::size_t i) { return i == 1; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worthwhile to have a 1x1x1 test case too since its allowed here to make sure it generalizes to the 3D case
Need to investigate the nasnet failure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3568 +/- ##
===========================================
+ Coverage 92.18% 92.19% +0.01%
===========================================
Files 513 515 +2
Lines 21596 21639 +43
===========================================
+ Hits 19908 19951 +43
Misses 1688 1688 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is this the only case where doing a convolution as a GEMM is beneficial? Technically any convolution can be done as a GEMM.
For other sizes, we need to do windowing(and possibly some padding) which will require an extra copy when we reshape to a gemm, with tensors that are larger then the original input. |
I cant merge this with the amount of perf regressions |
This build is not recommended to merge 🔴 |
🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output |
This allows us to use rocblas for some gemms.