-
-
Notifications
You must be signed in to change notification settings - Fork 35
Reduce allocations and improve performance in syevr!
#1176
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
Conversation
|
It would he good to include the before and after profiling results here to give an idea about the impact |
|
Thanks, added. Figured I should also do Hamiltonian too because it's the exact same situation. Looks like there are other spots that could benefit from this as well. EDIT: found an alternative to |
|
This PR is against the |
|
Oh, sorry - that's an accident. I relied on the 1.11 branch to make sure the line numbers were right and forked from there to edit. Is it possible to adjust, or do I need to make a new PR? |
|
I wouldn't know where to change it the target branch. Perhaps you can cherry-pick the commit (after squashing) and open a new PR? Or simply change the few lines manually in a fresh branch? |
|
You may click on the target branch icon on GitHub, which will provide options to change it. |
…matrices #54631" to v1.11 (#54742) (cherry picked from commit b69fc5786331a60c5357bafb901be077e5e3a90d)
…5605)" This reverts commit 287847936f9c952c6cdbf87fa5ecbbbbd4d1f605. (cherry picked from commit f09de94afb0c574f84274c746624df2ed840847d)
This backports the following commits: commit 9690961c426ce2640d7db6c89952e69f87873a93 Author: Jishnu Bhattacharya <[email protected]> Date: Mon Apr 29 21:43:31 2024 +0530 Add upper/lowertriangular functions and use in applytri (#53573) We may use the fact that a `Diagonal` is already triangular to avoid adding a wrapper. Fixes the specific example in https://github.com/JuliaLang/julia/issues/53564, although not the broader issue. This is because it changes the operation from a `UpperTriangular + UpperTriangular` to a `UpperTriangular + Diagonal`, which uses broadcasting. The latter operation may also allow one to define more efficient methods. commit 77821cdddb968eeabf31ccb6b214ccf59a604c68 Author: Jishnu Bhattacharya <[email protected]> Date: Wed Aug 28 00:53:31 2024 +0530 Remove Diagonal-triangular specialization commit 621fb2e739a04207df63857700aca3562b41b5eb Author: Jishnu Bhattacharya <[email protected]> Date: Wed Aug 28 00:50:49 2024 +0530 Restrict broadcasting to strided-diag Diagonal commit 58eb2045ddb5dbbfdb759c06239ca54751e73d71 Author: Jishnu Bhattacharya <[email protected]> Date: Wed Aug 28 00:44:47 2024 +0530 Add tests for partly filled parent commit 5aa6080a580bfbc9453e94a06f3e379e4517b316 Author: Jishnu Bhattacharya <[email protected]> Date: Tue Aug 27 20:42:07 2024 +0530 Reroute Symmetric/Hermitian + Diagonal through triangular (cherry picked from commit 4ab4722b6ee18009ea7f2fce4a63711a1efcd148)
…6089) Fix https://github.com/JuliaLang/julia/issues/56085 by calling a newly created `MulAddMul` object that only wraps the `alpha` (with `beta` set to `false`). This avoids the explicit multiplication if `alpha` is known to be `isone`. (cherry picked from commit 0af99e641a4329b57e48a314e2cedb592e02cd3b) (cherry picked from commit 415294a560db01f3d89699d8f00bdcba51257e34)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1176 +/- ##
==========================================
+ Coverage 91.89% 91.92% +0.03%
==========================================
Files 34 34
Lines 15353 15355 +2
==========================================
+ Hits 14108 14115 +7
+ Misses 1245 1240 -5 ☔ View full report in Codecov by Sentry. |
Profiling code that made heavy use of
eigen, creating the final arrays here was a hot spot.I imagine theEDIT: No longer using a@viewis going to get a frown... it's strictly reducing the second dimension so in theory it could be resized in-place, but I don't know of a way to do that?viewBefore:

After:
