Skip to content

[EPLB] Share the NIXL agent with the replacement communicator (simplification for #63134) - #1

Merged
stefankoncarevic merged 1 commit into
stefankoncarevic:elastic-ep-scaling-mi355from
NickLucche:eplb-nixl-share-agent
Oct 23, 2026
Merged

stefankoncarevic merged 1 commit into
stefankoncarevic:elastic-ep-scaling-mi355from
NickLucche:eplb-nixl-share-agent

Conversation

@NickLucche

Copy link
Copy Markdown

Suggested simplification for vllm-project#63134. It keeps the fix (one NIXL agent per worker, no second registration of the same pages) without the arena registry.

What changes

  • The new communicator takes the previous communicator's NixlWrapper (EplbState.create_communicator → create_eplb_communicator(prev_communicator=...)). It registers memory only when it creates a fresh agent.
  • _ArenaAgent, _ARENA_AGENTS, the (device, lo, hi) key, the user count, covers()/registered_ranges and the remote_names cache are all removed.
  • __del__ only releases transfer handles. The agent is dropped when the last communicator referencing it is collected, and its destructor deregisters memory and disconnects peers (~nixlLocalSection → deregisterMem).

Why this is enough (NIXL behavior)

  • Expert weights and expert_buffer keep their storage across elastic EP reconfigurations, since num_local_experts is fixed. So the existing registrations stay valid.
  • add_remote_agent for an already known peer is idempotent: loadRemoteMD merges into the existing entry, and loadConnInfo is a no-op when the conn info is unchanged. There is never a duplicate entry to guard against.

Net change is about −100 lines. The __del__ shutdown guard and the CI changes from the original PR are untouched.

Not tested on GPU from my side; it would be great if you could rerun the MI355 / H100 elastic EP steps with this.

Replace the per-arena agent registry with passing the previous
communicator's NixlWrapper to the new one. Expert weights and
expert_buffer keep their storage across reconfigurations, so the shared
agent's registrations stay valid; Python refcounting decides when the
agent dies and NIXL deregisters/disconnects in its destructor.
Re-adding a known peer's metadata is idempotent in NIXL, so no
remote-agent cache is needed either.

Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
@stefankoncarevic
stefankoncarevic merged commit d6f2578 into stefankoncarevic:elastic-ep-scaling-mi355 Oct 23, 2026
2 checks passed
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