Repository navigation
perf(lu): floor the blocked partial-pivoting recursion's trailing update - #14
Merged
Merged
Conversation
The recursion halves its panel every level and ran the level's panel solve and trailing product at the caller's `par` whatever their size, so at 512x512 it opened about sixty rayon regions, most of them a few thousand flops. They now take `Par::Seq` while the trailing update is not above `par_threshold` -- the same 128*128 the swap stage already reads -- and the recursion keeps forwarding the caller's `par`, so each level decides for its own trailing update. The floor comes from a sweep over 256x256, 512x512 and 1024x1024, not from one shape: 16384 is the best of nine values on all three. Parent -> child, best of 4, smallest over 14 interleaved repetitions, f64, four threads (CPUs 0-3): 128x128 0.0980 -> 0.0582, 192x192 0.1597 -> 0.1120, 256x256 0.3108 -> 0.2550, 384x384 0.6046 -> 0.4806, 512x512 1.2799 -> 1.1673, 1024x1024 5.2400 -> 5.1188. At one thread the two builds are the same code path and measure the same. Test: threaded_lu_matches_the_sequential_one (96, 128, 192, 256, 512). Gate: cargo test -p t4a-faer --lib, 205 passed, 0 failed, 2 ignored. Record: docs/worklogs/2026-10-14-lu-trailing-update-floor.md
shinaoka
force-pushed
the
perf/lu-trailing-update-floor
branch
from
October 14, 2026 04:53
b4efac0 to
28bc13b
Compare
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 blocked partial-pivoting LU ran its per-level panel solve and trailing product
at the caller's
parwhatever the trailing update's size, so at512 x 512itopened ~60 rayon regions around a few thousand flops each. Both now take
Par::Seqwhile
A11.nrows() * A11.ncols()is not aboveparams.par_threshold— the same128 * 128the swap stage below already reads — and the recursion still forwards thecaller's
par, so each level decides for its own trailing update.The floor is a sweep over
256 x 256,512 x 512and1024 x 1024, not one shape:16384 is the best of nine values on all three,
8192and24576are within 3%.Parent -> child, best of 4 calls, smallest over 14 interleaved repetitions,
f64,four threads (CPUs 0-3, four physical cores):
At one thread the two builds are the same code path and measure the same
(
512 x 512: 1.8818 -> 1.8724). Instrumenting the phases puts the whole win in thetrailing product and panel solve buckets below 16384 output elements.
Test:
linalg::lu::partial_pivoting::factor::tests::threaded_lu_matches_the_sequential_one(96, 128, 192 below the floor at the top level, 256 and 512 above it).
Gate:
cargo test -p t4a-faer --lib, 205 passed, 0 failed, 2 ignored.Record:
docs/worklogs/2026-10-14-lu-trailing-update-floor.md.Limits: four physical cores only, so the campaign's 8T row is not reproduced and the
four-thread crossover is not the eight-thread one. This does not close the vendor gap
at
512 x 512; the sequential leaf kernel and the level-0 products remain.