Skip to content

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

Merged
merged 7 commits into from
May 24, 2025
Merged

Add support for block sparse QR decomposition #117

merged 7 commits into from
May 24, 2025

Conversation

mtfishman
Copy link
Member

@mtfishman mtfishman commented May 16, 2025

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 case Y has blocks Y_b that lazily store the pair (S_b, V_b), which could then get split apart in a final step.

Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 84.32836% with 21 lines in your changes missing coverage. Please review.

Project coverage is 76.28%. Comparing base (2120b7a) to head (0b157d1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/factorizations/qr.jl 84.32% 21 Missing ⚠️
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     
Flag Coverage Δ
docs 11.96% <0.00%> (-1.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@lkdvos lkdvos left a 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

@mtfishman
Copy link
Member Author

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.

@mtfishman mtfishman changed the title [WIP] Add support for block sparse QR decomposition Add support for block sparse QR decomposition May 24, 2025
@mtfishman mtfishman marked this pull request as ready for review May 24, 2025 18:47
@mtfishman mtfishman merged commit bb62929 into main May 24, 2025
19 checks passed
@mtfishman mtfishman deleted the mf/qr branch May 24, 2025 22:11
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.

2 participants