Skip to content

Sweep the Woodbury path over a dense grid - #48

Merged
timholy merged 1 commit into
mainfrom
teh/grid-sweeps
Aug 23, 2026
Merged

Sweep the Woodbury path over a dense grid#48
timholy merged 1 commit into
mainfrom
teh/grid-sweeps

Conversation

@timholy

@timholy timholy commented Aug 23, 2026

Copy link
Copy Markdown
Member

The AbsLog{2} continuation now reads its support through one of two layouts held in SupportSystem{T,S}: an EdgeList (one stored entry per support element, as the LSQR and dense paths use) or a Grid (the values log|A_ij| on a dense matrix, with -Inf marking a position outside the support). A Grid is built exactly when the Woodbury path runs, so each linear-solve path has a single layout and the use_woodbury argument is replaced by the layout type.

On a Grid, the objective, the violated-pattern test, the boost shift, and the Woodbury assembly run as contiguous per-column passes that vectorize (view + eachindex + @simd + ifelse, no @inbounds, which measures slower here). Each sweep is about 5x faster than the edge-list sweep it replaces; end to end, a symmetric 2000x2000 solve drops from 3.9 s to 2.2 s and a 600x500 asymmetric solve from 0.83 s to 0.55 s, with identical solve, CG-iteration and Cholesky counts.

The wrappers now measure the support before laying it out, building only the layout the chosen path needs. Tests add a symmetric Woodbury variant with diagonal and paired zeros and asymmetric view/OffsetArray cases checking that output axes track the input.

Assisted-by: Claude Fable 5 (claude-fable-5) noreply@anthropic.com

The AbsLog{2} continuation now reads its support through one of two
layouts held in `SupportSystem{T,S}`: an `EdgeList` (one stored entry per
support element, as the LSQR and dense paths use) or a `Grid` (the values
`log|A_ij|` on a dense matrix, with `-Inf` marking a position outside the
support). A `Grid` is built exactly when the Woodbury path runs, so each
linear-solve path has a single layout and the `use_woodbury` argument is
replaced by the layout type.

On a `Grid`, the objective, the violated-pattern test, the boost shift, and
the Woodbury assembly run as contiguous per-column passes that vectorize
(`view` + `eachindex` + `@simd` + `ifelse`, no `@inbounds`, which measures
slower here). Each sweep is about 5x faster than the edge-list sweep it
replaces; end to end, a symmetric 2000x2000 solve drops from 3.9 s to 2.2 s
and a 600x500 asymmetric solve from 0.83 s to 0.55 s, with identical solve,
CG-iteration and Cholesky counts.

The wrappers now measure the support before laying it out, building only
the layout the chosen path needs. Tests add a symmetric Woodbury variant
with diagonal and paired zeros and asymmetric `view`/`OffsetArray` cases
checking that output axes track the input.

Assisted-by: Claude Fable 5 (claude-fable-5) <noreply@anthropic.com>
Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.71429% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.11%. Comparing base (1e48108) to head (883f10d).

Files with missing lines Patch % Lines
src/minimal_covers.jl 97.71% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   98.26%   98.11%   -0.15%     
==========================================
  Files          13       13              
  Lines        2712     2922     +210     
==========================================
+ Hits         2665     2867     +202     
- Misses         47       55       +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.

@timholy
timholy merged commit 38bb8a4 into main Aug 23, 2026
3 of 5 checks passed
@timholy
timholy deleted the teh/grid-sweeps branch August 23, 2026 11:27
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