-
Notifications
You must be signed in to change notification settings - Fork 2
Add support for block sparse QR decomposition #117
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
==========================================
+ Coverage 75.45% 76.28% +0.82%
==========================================
Files 29 30 +1
Lines 1308 1442 +134
==========================================
+ Hits 987 1100 +113
- Misses 321 342 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
I think that indeed, once the other PR is merged and the same changes are used here this is exactly how I would also do this.
Considering the code reuse, it might be possible to factor out some of it, but the more I look at it, the more I'm noticing small differences that would make it quite unelegant to try and merge all of the implementations together, in the sense that I'm expecting that the small differences would lead to many small if statements, which might actually make things more complicated to maintain in the long run. This is obviously just a feeling, and I might be wrong about this, but it also seems like the consequences of either option aren't that big
Yeah, that's one of my concerns as well. Probably block permuting to block diagonal as we discussed is the best way to go to share functionality across block sparse factorizations. |
Closely related to the implementation of block sparse SVD in #111.
Note that it still needs to be generalized to accomodate graded arrays similar to #114, I'll wait for that PR to get merged so this can share tools and code designs of that PR.
To-do:
@lkdvos the implementation is very similar to #111 so it makes me wonder if we can combine them in some way but that might be tricky.
Here's one potential approach: the QR decomposition here has the same block pattern as doing the factorization
(U, S * V)
, so maybe there could be a single code that factorizes into(X, Y)
where in the SVD caseY
has blocksY_b
that lazily store the pair(S_b, V_b)
, which could then get split apart in a final step.