Repository navigation
Stabilize Distributed LU and addition allocation checks - #843
Merged
Merged
Conversation
An allocating kernel may move whole tile payloads between processes even when both samples use the same input grid. Preserve those end-to-end measurements and add in-place leaves that hold workspace ownership fixed. Provide a separate diagnostic for ownership and process-level allocations.
Keep allocating LU count and byte changes and ordinary addition byte changes visible for review when five measured samples on the matched fixed leaf provide that allocation gate on both revisions. Preserve the addition count gate, timing, the original fallback, and the other leaves and backends.
Contributor
Dagger benchmarks:
|
| Backend | Regressions | Improvements | Within noise | Inconclusive time | Suites |
|---|---|---|---|---|---|
| Threads | 0 | 1 | 11 | 0 | 4/4 |
| Distributed | 0 | 0 | 0 | 2 | 4/4 |
| Distributed+Threads | 0 | 0 | 1 | 1 | 4/4 |
| MPI | 0 | 1 | 2 | 0 | 4/4 |
| MPI+Threads | 0 | 1 | 18 | 4 | 4/4 |
| Total | 0 | 3 | 32 | 7 | 20/20 |
Regressions across all backends
None in the available results.
Improvements across all backends
| Backend | Benchmark | Metric | Change |
|---|---|---|---|
| Threads | stencil/dagger/N=256 (block 128)/alloc (neighbors Wrap) |
time | -62.3% |
| MPI+Threads | array/dagger/N=1024 (block 128)/broadcast (X .+ 1) |
time | -50.5% |
| MPI | linalg/dagger/N=1024 (block 128)/cholesky |
time | -35.8% |
Advisory allocation changes
Paired fixed-placement measurements gate Distributed CPU allocating LU counts and bytes and allocating X + X bytes. Review the advisory changes for costs specific to the allocating path. The original X + X count gate still applies.
| Backend | Benchmark | Metric | Change |
|---|---|---|---|
| Distributed | array/dagger/N=1024 (block 128)/add (X + X) |
memory | -38.5% |
Threads (1 process × 4 threads) — 0 regressions, 1 improvements
| Suite | Regressions | Improvements | Within noise | Inconclusive time |
|---|---|---|---|---|
| array | 0 | 0 | 7 | 0 |
| linalg | 0 | 0 | 2 | 0 |
| sparse | 0 | 0 | 0 | 0 |
| stencil | 0 | 1 | 2 | 0 |
Improvements
| Benchmark | Metric | Change |
|---|---|---|
stencil/dagger/N=256 (block 128)/alloc (neighbors Wrap) |
time | -62.3% |
Within noise
| Benchmark | Metric | Change |
|---|---|---|
linalg/dagger/N=1024 (block 512)/matvec (A*x) |
time | +107.8% |
stencil/dagger/N=1024 (block 128)/update (+) |
time | +65.7% |
array/dagger/N=1024 (block 512)/reduce (sum) |
time | +58.1% |
array/dagger/N=1024 (block 128)/transpose (permutedims) |
time | +46.7% |
linalg/dagger/N=256 (block 256)/matvec (A*x) |
time | +35.4% |
array/dagger/N=256 (block 128)/add (X + X) |
time | +34.1% |
stencil/dagger/N=256 (block 128)/assign (const) |
time | +33.2% |
array/dagger/N=1024 (block 512)/alloc (rand) |
time | +33.2% |
array/dagger/N=1024 (block 128)/broadcast (X .+ 1) |
time | -38.4% |
array/dagger/N=256 (block 128)/reduce (sum) |
time | -45.9% |
array/dagger/N=1024 (block 128)/alloc (rand) |
time | -46.8% |
Distributed (4 processes × 1 thread) — 0 regressions, 0 improvements
| Suite | Regressions | Improvements | Within noise | Inconclusive time |
|---|---|---|---|---|
| array | 0 | 0 | 0 | 1 |
| linalg | 0 | 0 | 0 | 0 |
| sparse | 0 | 0 | 0 | 0 |
| stencil | 0 | 0 | 0 | 1 |
Inconclusive timing changes
| Benchmark | Metric | Change |
|---|---|---|
stencil/dagger/N=256 (block 128)/neighbors (Pad) |
time | +42.1% |
array/dagger/N=1024 (block 512)/reduce (sum) |
time | +39.9% |
Distributed+Threads (2 processes × 2 threads) — 0 regressions, 0 improvements
| Suite | Regressions | Improvements | Within noise | Inconclusive time |
|---|---|---|---|---|
| array | 0 | 0 | 1 | 1 |
| linalg | 0 | 0 | 0 | 0 |
| sparse | 0 | 0 | 0 | 0 |
| stencil | 0 | 0 | 0 | 0 |
Within noise
| Benchmark | Metric | Change |
|---|---|---|
array/dagger/N=1024 (block 512)/broadcast (X .+ 1) |
time | +44.4% |
Inconclusive timing changes
| Benchmark | Metric | Change |
|---|---|---|
array/dagger/N=1024 (block 512)/transpose (permutedims) |
time | +51.5% |
MPI (4 ranks × 1 thread) — 0 regressions, 1 improvements
| Suite | Regressions | Improvements | Within noise | Inconclusive time |
|---|---|---|---|---|
| array | 0 | 0 | 1 | 0 |
| linalg | 0 | 1 | 1 | 0 |
| sparse | 0 | 0 | 0 | 0 |
| stencil | 0 | 0 | 0 | 0 |
Improvements
| Benchmark | Metric | Change |
|---|---|---|
linalg/dagger/N=1024 (block 128)/cholesky |
time | -35.8% |
Within noise
| Benchmark | Metric | Change |
|---|---|---|
linalg/dagger/N=256 (block 128)/matvec (A*x) |
time | -46.1% |
array/dagger/N=1024 (block 128)/transpose (permutedims) |
time | -46.6% |
MPI+Threads (2 ranks × 2 threads) — 0 regressions, 1 improvements
| Suite | Regressions | Improvements | Within noise | Inconclusive time |
|---|---|---|---|---|
| array | 0 | 1 | 7 | 1 |
| linalg | 0 | 0 | 3 | 1 |
| sparse | 0 | 0 | 0 | 1 |
| stencil | 0 | 0 | 8 | 1 |
Improvements
| Benchmark | Metric | Change |
|---|---|---|
array/dagger/N=1024 (block 128)/broadcast (X .+ 1) |
time | -50.5% |
Within noise
| Benchmark | Metric | Change |
|---|---|---|
array/dagger/N=256 (block 128)/broadcast (X .+ 1) |
time | +281.7% |
array/dagger/N=1024 (block 512)/broadcast (X .+ 1) |
time | +87.5% |
array/dagger/N=256 (block 128)/map (sin.(X)) |
time | +81.2% |
linalg/dagger/N=256 (block 256)/syrk (A'*A) |
time | +70.8% |
array/dagger/N=256 (block 256)/add (X + X) |
time | +67.9% |
linalg/dagger/N=256 (block 128)/syrk (A'*A) |
time | +61.6% |
stencil/dagger/N=256 (block 256)/update (+) |
time | +59.0% |
array/dagger/N=1024 (block 512)/add (X + X) |
time | +48.8% |
stencil/dagger/N=256 (block 128)/update (+) |
time | +42.0% |
stencil/dagger/N=256 (block 256)/neighbors (Wrap) |
time | +40.8% |
array/dagger/N=1024 (block 512)/norm |
time | +37.6% |
array/dagger/N=256 (block 128)/alloc (rand) |
time | +36.1% |
stencil/dagger/N=1024 (block 512)/assign (const) |
time | -36.7% |
stencil/dagger/N=1024 (block 512)/neighbors (Reflect) |
time | -36.7% |
linalg/dagger/N=256 (block 128)/matvec (A*x) |
time | -39.4% |
stencil/dagger/N=1024 (block 512)/update (+) |
time | -45.4% |
stencil/dagger/N=256 (block 128)/neighbors (Reflect) |
time | -45.6% |
stencil/dagger/N=256 (block 128)/neighbors (Clamp) |
time | -48.5% |
Inconclusive timing changes
| Benchmark | Metric | Change |
|---|---|---|
array/dagger/N=256 (block 128)/transpose (permutedims) |
time | +115.1% |
stencil/dagger/N=256 (block 256)/neighbors (Pad) |
time | +50.1% |
linalg/dagger/N=1024 (block 128)/matvec (A*x) |
time | +46.4% |
sparse/dagger/N=256 (block 16)/spgemm (S*S) |
time | +35.5% |
Full results and plots (download the benchmark-results-* artifacts).
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.
Why
BenchmarkTools measures allocations on the driver. With Distributed placement, the same operation can put different tiles on the driver and report very different allocation totals. That makes the allocation checks for ordinary LU and addition sensitive to scheduler placement.
Changes
lu!and in-place addition leaves with cyclic workspaces or destinations. Keep the ordinary leaves for end-to-end timings and their original allocation measurements.X + Xbytes, as advisories when the same shape has at least five usable fixed-placement samples on each revision. Fixed measurements, timing, and ordinary addition counts still gate. A missing or incomplete peer keeps the original gate active.Validation
sin.(X)timing regression still failed. The fixed samples in this replay are local measurements.