Repository navigation
fix(slurm): stop pinning P/D decode nodes to mlx5_0 for UCX - #4061
Merged
Merged
Conversation
faresobeid
marked this pull request as ready for review
October 13, 2026 17:49
mikasenghaas
approved these changes
Oct 19, 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.
The P/D SLURM templates pin every decode node to one NIC with
UCX_NET_DEVICES=mlx5_0:1. This PR removes the pin. Decode then uses the same list as prefill: every ACTIVE InfiniBand port, falling back to RoCE.On a node where
mlx5_0is not an active InfiniBand port, decode cannot create its NIXL backend at all. On our H200 nodes,mlx5_0is one of the 8 InfiniBand NICs (seeswe-llmd.toml). So all 8 decode GPUs pull KV blocks and NIXL weights through that one NIC.Numbers
Qwen3-30B-A3B with P/D on 2 H200 nodes, split into four 4-GPU groups: 2 trainer (EP8), 1 prefill, 1 decode. NIXL weight broadcast with
overlap_transfer_and_replay, 16 steps per arm. Medians, first update dropped:UCX_NET_DEVICEStime/broadcast_weightsmlx5_0:1(main)Neither arm logged a NIXL error, a failed request or a traceback. Decode created its NIXL KV connector and NIXL weight agent with the port list.
Prefill and decode shared a physical node in that run, so the KV transfer did not cross the network.
Prefill and decode on different nodes
Same setup, but prefill on node 0 and decode on node 1, so every KV transfer crosses InfiniBand. The trainer spans both nodes. Same tree for both arms (main + #4059); the only difference is the decode pin. 16 steps per arm. KV numbers are decode-side
vllm:nixl_*totals from/metrics, summed over the 4 decode engines:UCX_NET_DEVICEStime/broadcast_weightstime/stepmlx5_0:1(main)All prompt tokens on decode came from
external_kv_transferin both arms. Cross-node KV transfer works without the pin. It is 1.7x faster per transfer, and the weight transfer is 4.6x faster. Step time is about the same because KV and weight transfer are a small part of the step.Checks
rl @ examples/advanced/glm-5.3/swe.toml --dry-runandinference @ examples/advanced/glm-5.3/infer/pd-llmd.toml --dry-runrender;bash -npasses on both scripts.pytest tests/unit -m "not gpu" -k "slurm or sbatch or template or disagg": 3 passed.Note
Medium Risk
Changes cluster networking for NIXL/KV and weight transfer on decode; behavior depends on which RDMA ports are ACTIVE, though benchmarks in the PR show improved throughput without NIXL failures.
Overview
Removes the decode-only
export UCX_NET_DEVICES=mlx5_0:1from the P/D branches ininference.sbatch.j2andmulti_node_rl.sbatch.j2.Decode nodes now keep the same UCX device list as prefill: active InfiniBand ports from sysfs (RoCE fallback, then
all), which the templates already set before the role split.decode_env_varscan still override UCX per deployment if needed.Reviewed by Cursor Bugbot for commit 74071cd. Bugbot is set up for automated code reviews on this repo. Configure here.