Skip to content

Add RankOneJacobian for rank-one PSD blocks - #93

Merged
blegat merged 1 commit into
mainfrom
bl/rank1_jacobian
Oct 30, 2026
Merged

blegat merged 1 commit into
mainfrom
bl/rank1_jacobian

Conversation

@blegat

@blegat blegat commented Oct 28, 2026

Copy link
Copy Markdown
Owner

For a PSD block whose constraint matrices are all rank-one, store the m × d factors instead of the sparse d² × m Jacobian. jtprod is computed as U' * Diagonal(w .* y) * U and jprod as rowwise dots of U * V with U, both with dense BLAS products.

H and the Schur matvec are bitwise identical to before on all three instances. All seven relevant test files pass, and the existing rank-one tests now assert that a RankOneJacobian is used.

bl/rank1 bl/rank1_jacobian
r1, d = 40, m = 800: setup 84 ms / 74 MB 1.4 ms / 5.9 MB
unsafe_jtprod 0.60 ms 0.055 ms
add_jprod! 1.05 ms 0.053 ms
r1, d = 300, m = 100: setup 340 ms / 484 MB 0.25 ms / 3.1 MB
unsafe_jtprod 6.5 ms 0.28 ms
add_jprod! 8.1 ms 0.29 ms
sparse SDP: all calls unchanged unchanged

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.55%. Comparing base (cc52525) to head (5a6f983).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   99.54%   99.55%   +0.01%     
==========================================
  Files          29       29              
  Lines        1745     1792      +47     
==========================================
+ Hits         1737     1784      +47     
  Misses          8        8              

☔ View full report in Codecov by Harness.
📢 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.

@blegat
blegat force-pushed the bl/rank1_jacobian branch from 6c2c9eb to 39195e1 Compare October 29, 2026 08:44
For a PSD block whose constraint matrices are all rank-one, store the
m × d factors instead of the sparse d² × m Jacobian. jtprod is computed
as U' * Diagonal(w .* y) * U and jprod as rowwise dots of U * V with U,
both with dense BLAS products.
@blegat
blegat force-pushed the bl/rank1_jacobian branch from 39195e1 to 5a6f983 Compare October 30, 2026 07:37
@blegat
blegat changed the base branch from bl/rank1 to main October 30, 2026 12:27
@blegat blegat closed this Oct 30, 2026
@blegat blegat reopened this Oct 30, 2026
@blegat
blegat merged commit 23fac92 into main Oct 30, 2026
6 checks passed
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.

1 participant