Sweep the Woodbury path over a dense grid - #48
Merged
Merged
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AbsLog{2} continuation now reads its support through one of two layouts held in
SupportSystem{T,S}: anEdgeList(one stored entry per support element, as the LSQR and dense paths use) or aGrid(the valueslog|A_ij|on a dense matrix, with-Infmarking a position outside the support). AGridis built exactly when the Woodbury path runs, so each linear-solve path has a single layout and theuse_woodburyargument 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/OffsetArraycases checking that output axes track the input.Assisted-by: Claude Fable 5 (claude-fable-5) noreply@anthropic.com