Skip to content

Make generic gather replay incremental - #242

Merged
shinaoka merged 8 commits into
umbrella/issue-burndown-2026-08from
perf/237-generic-gather
Aug 24, 2026
Merged

Make generic gather replay incremental#242
shinaoka merged 8 commits into
umbrella/issue-burndown-2026-08from
perf/237-generic-gather

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Summary

  • precompute private generic-gather replay steps/resets for destination, window, and index-batch offsets
  • decode once for serial replay and once per parallel worker range, then advance state incrementally
  • keep index-vector contributions fresh and data-dependent per element while removing full rank scans and checked-offset reconstruction
  • validate signed layout spans and replay deltas, including negative strides
  • preserve the compact rank-one fast path and all public APIs
  • add generic rank/layout Criterion coverage and ground-truth initialized/uninitialized serial/parallel tests

Fixes #237
Refs #213

Performance

AMD EPYC 7713P, release Criterion threshold profile, topology/load-gated 1T/4T runs. At N = 262,144:

case baseline candidate speedup
rank 4 serial 15.737 ms 2.0825 ms 7.56x
rank 8 serial 27.882 ms 2.4558 ms 11.35x
rank 4 max_threads(4) 1.6719 ms 0.6305 ms 2.65x
rank 8 max_threads(4) 2.6332 ms 0.6965 ms 3.78x
non-unit rank 2 serial 10.418 ms 1.8255 ms 5.71x
negative rank 2 serial 10.378 ms 1.8131 ms 5.72x

All 40 generic cases improved with p < 0.05; all predeclared gates passed. The full 48-case baseline and candidate tables, CIs, affinity/noise gates, and CCD control-shift disclosure are in the worklog.

Work log and review gates

  • docs/worklogs/2026-08-24-issue-237-generic-gather.md
  • pre-implementation design review: reviewer-flash Correct-to-merge at 9dfdf05
  • safety/semantic preflight: no Critical/Important findings at d95a387
  • exact-final review: Correct-to-merge at 1be7ef6208b62e1aafb7be09e35346a5262e105b

Verification

  • focused default gather/uninitialized tests: 79 passed
  • focused parallel gather/uninitialized/policy tests: 88 passed
  • cargo check -p strided-kernel default + parallel: pass
  • cargo fmt --all -- --check: pass
  • cargo test --workspace: 904 passed, 9 ignored
  • cargo doc --workspace --no-deps: pass
  • deterministic repository-rules review: pass, no findings
  • repository-rules review script: 83 passed
  • modified gather_plan.rs coverage: 82.95% (repository threshold 80%)

The local all-workspace coverage report also identified three pre-existing unmodified files below their configured thresholds; this PR does not alter them. Hosted CI remains authoritative for the exact coverage gate.

@shinaoka
shinaoka merged commit acdeea3 into umbrella/issue-burndown-2026-08 Aug 24, 2026
6 checks passed
@shinaoka
shinaoka deleted the perf/237-generic-gather branch August 24, 2026 12:56
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