feat(miles): NCCL broadcast weight-update transport (#42) - #43
Open
zhenyulincs wants to merge 1 commit into
Open
feat(miles): NCCL broadcast weight-update transport (#42)#43zhenyulincs wants to merge 1 commit into
zhenyulincs wants to merge 1 commit into
Conversation
- unlock Path B in MilesModelUpdateService: per-GPU NCCL rank cursor (world_size = 1 + per_engine * len(broadcast_set)), teardown-ack port-claim release, wedged-sender leak-and-log, _PortClaimStore fallback backend for miles mode + collision re-pick via start_port - user-selected transport mode env RLIX_MILES_UPDATE_TRANSPORT (cpu_serialize default / broadcast strict no-mix / auto topology split), C9 mixed-transport startup assertion, engine-GPU-count uniformity startup guard - sync-under-load bracket in sync_base_weights_to_active: quiesce (router unregister + abort) before finalize, fixing the /flush_cache timeout under fully-async load; atomic manager re-admission via register_router_if_active; escalation when re-register fails after a successful sync; registration-time capability probe for version skew - harness: env-parameterized sglang mem fraction (default preserved) - tests: service broadcast + claim rules, transport-mode matrix, uniformity guard, bracket AST ordering + behavioral concurrency - plan + full evidence trail (codex plan r1-r6, impl r1-r16) in plans/
This was referenced Aug 16, 2026
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.
Closes #42.
What
Unlocks the NCCL broadcast weight-update transport for MILES RLix mode, as a user-selected mode — plus the concurrency/robustness fixes that 20-rollout under-load runs surfaced. Companion miles PR: rlops/miles#37 carries the sender-side NCCL + driver topology support; this PR is the rlix half.
Transport modes (
RLIX_MILES_UPDATE_TRANSPORT)cpu_serialize(default)autobroadcastKey mechanisms
world_size = 1 + per_engine × len(broadcast_set)) matching SGLang'srank_offsetsemantics; per-engine GPU count derived fromrollout_num_gpus_per_engine, backed by a startup uniformity guard rejecting SGLang server-group overrides that diverge (heterogeneous engines are explicitly out of scope)._PortClaimStoredetached fallback actor (ROLL's SharedStorage doesn't exist there — claims were silently skipped, and concurrent pipeline syncs deterministically collided onget_free_port's 20000 base, cross-wiring NCCL TCP stores). Collision retry re-picks withstart_port=port+1; claim release only after sender teardown-ack; wedged-sender path leaks-and-logs instead of deleting under a possibly-live TCP store.sync_base_weights_to_active): under the fully-async rollout, the router keeps dispatching during finalize's/flush_cachewait → guaranteed 60s timeout under real load. The bracket mirrorsshrink_engines' quiesce ordering (router unregister → abort → sync), re-admits via the new atomicRolloutManager.register_router_if_active(state check + idempotent/add_workerin one serialized manager call — no TOCTOU vs concurrent shrink), escalates when re-registration fails after a successful sync, and probes the manager capability at registration so new-rlix/old-miles version skew fails before any engine is quiesced.RLIX_ASSERT_MIXED_TRANSPORT=1): overlap smokes must produce mixed sessions per pipeline or be declared INVALID.Evidence (details in
plans/miles-nccl-broadcast-plan.md§10-§15)backend=nccl, world_size=3), 48 NCCL receives + 46 cpu legs (mixed every sync), concurrent syncs on distinct ports (20000×27 / 20001×18 — claim store verified under load), zero OOM / zero flush timeouts / EXIT 0, dual-smoke 7-condition pass-bar PASS.broadcast→ actionable classification error, exit 1.Test plan
pytest tests/test_miles_service_broadcast.py— rank cursor, claim ownership incl. post-resolution cancel + wedged-sender leak, collision re-pick, fail-fast storage lookup (12 tests)pytest tests/test_transport_mode_classification.py— mode matrix, strict rejection, uniformity guard, C9 assertion (18 tests)pytest tests/test_sync_under_load_bracket.py+test_sync_bracket_concurrency.py— bracket AST ordering + behavioral concurrent-shrink / escalation / original-error precedence (7 tests)connect()API failure intest_orchestrator_death_is_benign, fails identically on base — not introduced here)Known limitations (documented in plan)
torchfor broadcast + offload_train (preloadleaves stale allocator pointers at sender staging).