-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add fast path in generic matmul #1202
Conversation
This manually adds the critical optimisation investigated in Julia issue 56954. While we could rely on LLVM to continue doing this optimisation, it's more robust to add it manually.
The performance regression doesn't seem to exist on the Julia master branch, which is what this repo is in sync with. This is probably because of various other refactorings. The issue is seen on v1.11. We may still add this here though if this seems like a good idea. We'll just have to remember to make a separate PR to v1.11. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1202 +/- ##
==========================================
+ Coverage 91.86% 91.88% +0.02%
==========================================
Files 34 34
Lines 15365 15366 +1
==========================================
+ Hits 14115 14119 +4
+ Misses 1250 1247 -3 ☔ View full report in Codecov by Sentry. |
Also, would you mind elaborating on what the specific optimization is in this case, and how you tracked it down? |
Yes - the optimisation is that, whenever
has no effect and can be skipped. You can verify by yourself on Julia 1.11.1 that a large bitmatrix with all zeros is much faster to multiply than one with ones. I tracked it down by noticing that
|
Thanks a lot! I think this is good to merge. |
This manually adds the critical optimisation investigated in JuliaLang/julia#56954. While we could rely on LLVM to continue doing this optimisation, it's more robust to add it manually.