feat(rlix): lower whole-GPU residual gate default to 7.0 GiB; preload dual smoke#31
Open
zhenyulincs wants to merge 2 commits into
Open
feat(rlix): lower whole-GPU residual gate default to 7.0 GiB; preload dual smoke#31zhenyulincs wants to merge 2 commits into
zhenyulincs wants to merge 2 commits into
Conversation
…l smoke 2026-07-05 audit (4x RTX 5090 cu130, dual smokes EXIT_CODE=0 in both modes): with MILES_TMS_HOOK_MODE=torch, tms pause releases only the 2.76 GiB of init-time weight buffers — Megatron optimizer state (~5.7 GiB, created lazily at the first optimizer step) never offloads, leaving 11.07 GiB whole-GPU residual at cycle 2 (why the default was 13.0). In preload mode everything is pausable: residual is a stable 5.02 GiB. With the paired miles changes the dual smoke runs preload, so the gate default drops 13.0 -> 7.0 (measured floor + margin). - miles_pipeline.py + miles_coordinator.py: default 7.0; gate RuntimeError now names the hook-mode coupling and the rollback knobs (MILES_TMS_HOOK_MODE=torch + MILES_MAX_RESIDUAL_GPU_MEM_GB=13) - run_smoke_dual.sh: MILES_TMS_HOOK_MODE=preload (pre-cu13 Blackwell fallback documented); e2e/inject_fault smokes stay torch-mode, pinned to MILES_MAX_RESIDUAL_GPU_MEM_GB=13 - wiring tests updated to 7.0; docs rows appended (append-only convention) Depends on rlops/miles: the cu13 preload guard relaxation PR AND rlops/miles#5 (demotes the per-engine /server_info accounting assert to diagnostics — its ~9.3 GiB accounting value is not physical residency and would false-fail a 7.0 threshold). E2E: paired trio (this + both miles changes) dual smoke on 4x RTX 5090: EXIT_CODE=0; gate readings 3.45-3.47 GB (cycle 1) / 5.02-5.04 GB (cycle 2) vs threshold 7.00 GB. Tests: 7 passed. Codex APPROVE_WITH_NOTES, 0 blockers.
…smoke Drop the planned miles-side guard change entirely: instead of teaching the arch guard about CUDA versions, the dual smoke exports the guard's own MILES_TMS_ALLOW_PRELOAD_ON_BLACKWELL=1 (read by actors via raylet env inheritance — exported before ray start). This exact combination (unmodified miles + hatch + preload) is what passed the original route-A dual E2E (EXIT_CODE=0, residual 5.02 GiB). Codex APPROVE_WITH_NOTES.
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.
What
Lower the
MILES_MAX_RESIDUAL_GPU_MEM_GBdefault from 13.0 to 7.0 at both call sites (hard gate inmiles_pipeline.py, diagnostics mirror inmiles_coordinator.py), switchrun_smoke_dual.shtoMILES_TMS_HOOK_MODE=preload, and extend the gate's RuntimeError with the hook-mode coupling hint + rollback knobs. Wiring tests updated; docs rows appended (append-only).Why — measured basis
2026-07-05 audit (4x RTX 5090 cu130; details in #17's description):
Dependencies — status
/server_infoaccounting assert to diagnostics. Required: its ~9.3 GiB accounting value is NOT physical residency; a paired E2E without it false-failed at 7.0 exactly there (it passed at 13.0 only by numerical coincidence).run_smoke_dual.shin this PR exportsMILES_TMS_ALLOW_PRELOAD_ON_BLACKWELL=1(reaches actors via raylet env inheritance; exported beforeray start). The planned guard-relaxation PR feat(miles): allow tms preload on Blackwell with cu13+ torch wheels miles#24 was closed as unnecessary; the cu12.9 segfault it would have gated on is confirmed gone on cu130 images (audit in fix(rlix): gate MILES wake on whole-GPU residual memory (R02-01) #17).Compatibility / rollback
torch-hook deployments (pre-cu13 Blackwell):
export MILES_TMS_HOOK_MODE=torch+export MILES_MAX_RESIDUAL_GPU_MEM_GB=13(documented in the smoke scripts and appended docs rows;run_smoke_e2e.sh/run_smoke_inject_fault.shship with exactly that pinning). The gate's error message now names this remedy explicitly.Tests
E2E
Two dual-smoke validations on 4x RTX 5090 cu130, both
EXIT_CODE=0: (a) hatch-authorized preload on unmodified miles (the route-A audit run, residual 5.02 GiB); (b) the 7.0 gate + miles#5 + preload (authorized via a since-dropped guard-relaxation build — runtime-equivalent to the hatch path, which only differs in how preload is authorized at actor init); hook_mode='preload' in actor logs; SGLang per-engine diagnostic 1.699-1.719 GiB; whole-GPU gate readings 3.45-3.47 GB (cycle 1) / 5.02-5.04 GB (cycle 2) vs threshold 7.00 GB, stable across cycles. Known teardown-time RolloutManager HTTP noise only.Tail investigation update (2026-07-05, supersedes the earlier "lower to ~3.0" plan)
The ~1.6 GiB train-created tail was root-caused. Two findings change the roadmap:
torch_memory_saver.disable()weight-sync-window suspicion is refuted for rlix mode. A mock confirmed the mechanism exists (allocations insidedisable()do escapepause()), but rlix mode never executes that window: weight sync goes throughrun_sync_session(GPU→CPU copies only;update_weights()and itsdisable()wrap at milesactor.py:570are not called — seerlix_train_loop.py:59).Consequence: gate-GPU floor = 3.3 (Megatron) + 1.7 (sleeping engine) ≈ 5.0 GiB — exactly the measured gate reading — so 7.0 is close to the practical floor for this topology and a later ~3.0 default is NOT achievable. Remaining shaving candidates are a few hundred MB at best (e.g.
torch._C._cuda_clearCublasWorkspaces()inclear_memory(), auditingdestroy_process_groups()for surviving default-group NCCL slabs) and are tracked separately; they would not change this PR's 7.0 default.Codex review: APPROVE_WITH_NOTES, 0 blockers.
Refs: #17 (audit evidence),
plans/m11-review.review-report/R02.md(R02-01).