Skip to content

fix(weight-sync): compose engine waves, credits and timeline - #2362

Open
0z5a wants to merge 4 commits into
THUDM:mainfrom
0z5a:codex/weight-sync-integrated-validation
Open

fix(weight-sync): compose engine waves, credits and timeline#2362
0z5a wants to merge 4 commits into
THUDM:mainfrom
0z5a:codex/weight-sync-integrated-validation

Conversation

@0z5a

@0z5a 0z5a commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Compose the engine-wave, bucket-credit and trainer-timeline proposals in #2351, #2352 and #2353. This is a Draft integration follow-up, not an additional competing scheduler. The new integration commits are 6ce21e4 and 58d5048; GitHub's main-based aggregate diff also includes their prerequisite stacks.

  • Hold one logical bucket reservation across all engine waves; drain transport, staging and consumer acknowledgements before advancing a wave.
  • Propagate peer failures, retain failed-wave resources, and publish the weight version only after successful loads and resume barriers.
  • Keep API return distinct from subsequent completion; record wave identity, ACK spans and actual credit-release/publication boundaries.
  • Keep tracing disabled by default. Multi-wave mode drains each bucket's waves before admitting the next bucket and does not claim inter-bucket overlap.

Validation

Recorded on this exact integration revision before publication:

  • 101 targeted CPU tests passed, covering timeline, credits, tensor/IPC updater contracts, wave helpers/callsites, benchmarks and arguments.
  • Included a real two-rank asynchronous Gloo credit test; an additional four-rank Gloo callsite smoke passed with actual trainer/engine process groups and control-plane stubs.
  • Pinned isort 5.13.2, Black 24.3.0 and Ruff 0.14.7 checks passed; patch application reproduced the exact integration tree.

The CPU engine fixtures and fake-CUDA event tests are not real SGLang loads. Full trainer-to-conversion-to-Ray/SGLang GPU execution, full-model numerical checks and independent performance confirmation remain outstanding. No new GPU run or performance improvement is claimed by this publication.

Review notes

The prerequisite PRs remain separate review units. This draft records their composition fixes and tests; do not apply both its aggregate patch and the original stacks twice. Rebase/narrow the diff after prerequisites land. An open-PR search found the existing measurement/runtime proposals, not a separate implementation of these composition fixes.

AI assistance: OpenAI Codex. Keep Draft until human review and the outstanding production checks are complete.

大大小小 and others added 4 commits September 4, 2026 22:58
Keep logical credit, transport, staging, and consumer lifetimes distinct; propagate colocated load acknowledgement across each existing TP group; poison failed versions; and publish only after all consumers resume. Add fixed-cardinality metrics, failure coverage, and opt-in 2/4-rank NCCL validation.

Assisted-by: OpenAI Codex
Signed-off-by: jiachun <2609024259@qq.com>
Integrate the local wave/callsite stack through 175ad4c with the credit stack through e9fd2ee. Preserve logical bucket admission across waves, fence transport completion, propagate load failure before the next wave, retain failed-wave resources, and keep version publication after consumer resume. Validate both production updater variants with logical 2/4-engine tests and real Gloo credit transport.

Assisted-by: OpenAI Codex
Signed-off-by: jiachun <2609024259@qq.com>
…ycles

Integrate the timeline stack through 100470c on top of wave/credit composition. Preserve API return separately from transport completion, close NVTX ranges before subsequent submissions, retain wave identity, trace consumer acknowledgements and actual reuse/publication boundaries, and record failures without success markers. Cover trace-on/off production updater contracts; GPU/Ray/SGLang end-to-end confirmation remains unvalidated.

Assisted-by: OpenAI Codex
Signed-off-by: jiachun <2609024259@qq.com>
@0z5a

0z5a commented Sep 7, 2026

Copy link
Copy Markdown
Author

Hi @zhuzilin Would you mind having a review?

@0z5a
0z5a marked this pull request as ready for review September 7, 2026 09:35
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.

2 participants