Repository navigation
Add accelerator-proportional worker memory infrastructure - #4754
Conversation
|
Thanks for the contribution!
中文感谢你的贡献!
|
|
Generally most InferenceX submissions don't need to add changes to the infx package. On the off chance they do, generally the diff is small. Please prompt your agent to clean your PR to keep your diff to only necessary & minimal changes too. We have an increased code quality bar for changes to the infx package. 中文大多数 InferenceX 提交通常不需要修改 infx 包。即使确实需要,改动通常也很小。请让你的 agent 清理 PR,使改动只包含必要且最小的内容。infx 包的改动有更高的代码质量要求。 |
There was a problem hiding this comment.
Findings marked 🟡 are optional suggestions and need no follow-up push.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🔴
inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/minimaxm31flash/vllm/b200-fp4-mtp/agentic.yaml— After this merge, the MiniMax vLLM TP4 DRAM points on b200-nscale get a worker memory cap that their own CPU offload pool fills almost completely, so the workers can be OOM-killed. The new cap is 2_047_536 * 4 // 8 = 1,023,768 MiB.cpu_bytes_to_useis 1073000000000 B (1,023,292 MiB), which leaves about 475 MiB for four TP workers, EngineCore and the API server. Fix: shrinkcpu_bytes_to_useon every TP4 b200 point so the pool plus process memory fits under the GPU-share limit with real headroom. Same pattern at 4 sites (vllm/b200-fp4-mtp/agentic.yaml:75, agg-variants.yaml:60, agg-variants.yaml:72, agg-variants.yaml:84).Why this was flagged
The trigger is nvidia-master.yaml:4345-4348, which runs TP4 kv-offloading dram points (conc 32/40/48/56) on cluster:b200-nscale. That cluster lists available-cpu-dram-mib 2_047_536 (runners.yaml:447) and leaves single-node-exclusive at its default True (clusters/slurm.py:191). On the base branch, run_single_node set step_mib=None and job mem 0 for exclusive clusters, so the worker could use the whole node. Now bind_memory (memory.py:68-88) writes roles.agg.srun_options.mem = 1023768M. The recipe pins SimpleCPUOffloadConnector
cpu_bytes_to_use1073000000000 B, sized to the old whole-host budget, as the deleted comment at old line 67-68 says. That pinned pool is charged to the step's memory cgroup, and the four ranks, EngineCore and API server need several GB more, so the step exceeds its limit and is OOM-killed (assuming Slurm enforces --mem with cgroups). The PR description calls OOMs on low-headroom pools a known risk, but nothing checks recipe pool sizes against the new limit. This point fails outright rather than just risking it.Verification: On the base, run_single_node set
step_mib, job_mib = None, 0for exclusive nodes, so the TP4 DRAM points on b200-nscale had no cap. Now memory.py:78 computes 2_047_536*4//8 = 1,023,768 MiB and memory.py:90 writes it as srun mem. agentic.yaml:75 keeps"cpu_bytes_to_use":1073000000000(1,023,292.5 MiB), which leaves about 475 MiB for the workers. -
🔴
inferencex-e2e/configs/nvidia-master.yaml— Result collection is never triggered for agentic configs whose matrix and runtime memory limits this PR changes, because noperf-changelog.yamlentry is added. AGENTS.md:87 requires one when a change alters what a benchmark runs. This change dropsdram-utilizationfrom many config keys and edits many srt recipes. It also caps every srt worker at its GPU share, where exclusive jobs used to get--mem=0. Fix: append one block toperf-changelog.yamllisting the config keys thatpython -m infx.matrix.changed --base origin/mainreports. [also at: inferencex-e2e/configs/amd-master.yaml:1063 - Every agentic DRAM benchmark now runs under new memory limits, but this PR adds no perf-changelog entry, so result collection is never triggered for the changed points.; inferencex-e2e/infx/srt_slurm/memory.py:94 - This changes what benchmarks run, but the PR adds noperf-changelog.yamlentry, which AGENTS.md requires. Without one, result collection for the affected config keys never runs.]Why this was flagged
The diff edits
dram-utilizationand theTOTAL_CPU_DRAM_GBadditional-settings in amd-master.yaml and nvidia-master.yaml, plus 27 single-node srt recipes. memory.py:539-547 now writes per-rolesrun_options.memand an sbatchmeminto every bound recipe, including fixed-seq-len ones. The PR description says recipes 'may now OOM', which confirms runtime behaviour changes. AGENTS.md:87 says such a change needs aperf-changelog.yamlentry and that 'the entry triggers result collection'. The diff does not touchinferencex-e2e/perf-changelog.yaml, so no sweep runs to show that the affected agentic points still pass under the new limits. On the base branch these configs had their recorded changelog history and the old uncapped exclusive memory.Verification: Trigger: merging this PR without a changelog block. The PR changes the memory every srt agentic and fixed-seq-len worker runs under, but no sweep or result collection is triggered. CONTRIBUTING.md:23 says
run-sweep.ymlsweeps "run only for same-repository PRs that changeinferencex-e2e/perf-changelog.yaml".
6a6627d to
75d8209
Compare
d90a005 to
9d33656
Compare
|
The B200 MiniMax TP4 pool finding is valid. The config layer now uses 966,000,000,000 bytes instead of 1,073,000,000,000, matching the existing TP8 per-rank pool size and leaving about 100 GiB for other worker allocations. The worker cap remains unchanged; the smaller cache can affect throughput. See config change. The perf-changelog entry remains omitted as explicitly requested. |
aaabaa8 to
3f78c73
Compare
d8284fc to
7dbcf94
Compare
7dbcf94 to
affbec4
Compare
Allocates inference-worker DRAM by GPU share: 4 of 8 GPUs gets half the node’s available DRAM.
Master YAML supplies worker counts and
gpus-per-worker; the adapter copies them into SRT roles. Existing recipe node reservations and SRT scheduling remain unchanged. Each worker step receivesavailable MiB × step GPUs / physical GPUs per node, rounded down. MPI ranks in one step share its cap; clients, routers and telemetry retain their existing limits.Supports multinode and colocated workers. Uses the existing SRT pin; no SRT changes are required. The scheduler reads node reservations from recipes, so the duplicate master
num-nodesfield is removed.Stack: remove old DRAM logic #4766 → this infrastructure PR → config migration #4763. Land all three together; the new schema requires the config migration. Full-node workers share the job budget with helpers; no separate helper headroom is reserved.
Earlier live runs covered seven 10-minute AgentX profiles and three deliberate worker-OOM tests. These predate the master-resource redesign. GB200 enforcement is blocked by
ConstrainRAMSpace=no.Validation runs
AgentX profiles had zero request errors. B200 multi-node had 19 drain-deadline cancellations. Worker caps were sampled on the host and inside containers; helper limits were checked separately.
Deliberate pressure caused worker-cgroup OOMs on MI355X, B200 and GB300 while helpers remained alive. These runs ended with expected failures.
/scratch/models/GLM-5.2-NVFP4; logs. Half-node validation completed.B200 profiles and OOM tests used a05681b24; other profiles used 6bf81a8c5. Both precede the master-resource redesign. Pressure-probe and observer instrumentation.
Live cluster memory smoke — 2026-11-03
All ten configured budgets fit
min(RealMemory − MemSpecLimit, floor(MemTotal / 1024) − 16384)MiB. Slurm records were checked across all 130 nodes; physical RAM was read on 77 nodes, including a short Slurm task on each cluster where direct SSH was unavailable. This checks the budget inputs, not container enforcement.AMD budgets are 1–2 MiB below the current physical samples; no values needed changing. Calculated values use all-node Slurm records and the physical samples shown.
Earlier attempts excluded from successful OOM evidence