Skip to content

[Perf][PCP] Fuse direct-KV publication fence - #54030

Draft
LopezCastroRoberto wants to merge 6 commits into
vllm-project:mainfrom
LopezCastroRoberto:codex/fuse-pcp-direct-kv-fence
Draft

LopezCastroRoberto wants to merge 6 commits into
vllm-project:mainfrom
LopezCastroRoberto:codex/fuse-pcp-direct-kv-fence

Conversation

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #52863.

  • Fuse peer publication and waiting into one Triton kernel.
  • Move epoch advancement from the host onto the device.
  • Reduce each direct-KV fence from two kernel launches to one.
  • Make epoch advancement work correctly during CUDA graph replay.

Motivation

#52863 launches separate publish and wait kernels for every direct-KV fence.
These fences execute once per sparse layer, making repeated launch overhead
material in PCP profiles.

Keeping the epoch on the host also prevents a captured CUDA graph from
advancing it on each replay.

foraxe and others added 6 commits August 25, 2026 03:28
… memory

Port the direct-final PCP KV idea from vllm-project#49517 onto the merged vllm-project#50484
symmetric-memory substrate. Producers write final Main-KV and Indexer-K
rows into every replica through peer pointers and skip the vllm-project#52046
AllGather + insert path.

Signed-off-by: 云挚 <ningyunxiao.nyx@antgroup.com>
… oracle

Make opt-in SymmMem allocation all-or-nothing at startup. Fence timeout
now issues an unconditional PTX trap. Oracle covers fp8_ds_mla +
Indexer-K on a packed backing (PCP2/PCP4). Wire teardown and drop
peer-view refs on close.

Signed-off-by: 云挚 <ningyunxiao.nyx@antgroup.com>
Keep this PR P2P-only. NVLS multimem.st lives on
foraxe:agent/pcp-direct-kv-symm-mem-multimem.

Signed-off-by: 云挚 <ningyunxiao.nyx@antgroup.com>
Scope symmetric KV publication to each PCP subgroup while allowing TP>1, and add a four-GPU TP2/PCP2 byte oracle.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: 云挚 <ningyunxiao.nyx@antgroup.com>
Keep direct symmetric-memory allocation integrated with the current common allocate_kv_cache path after rebasing onto upstream main.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: 云挚 <ningyunxiao.nyx@antgroup.com>
Move epoch advancement onto the device and combine system-scope publication and peer waiting in a single Triton kernel. This reduces every direct-KV fence from two kernel launches to one and lets the epoch advance correctly during CUDA graph replay.

Add a two-GPU replay test that captures the fence, replays it repeatedly, and verifies that every replay advances the device-resident epoch.

Depends-On: vllm-project#52863
@mergify mergify Bot added deepseek Related to DeepSeek models mrv2 Model Runner V2 specific labels Aug 27, 2026
@mergify

mergify Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @LopezCastroRoberto.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 27, 2026
LopezCastroRoberto added a commit to LopezCastroRoberto/vllm that referenced this pull request Sep 7, 2026
Fuse device epoch advancement, system-scope publication, and peer waiting into one graph-replay-safe direct-KV fence kernel. Depends on vllm-project#52863.
LucasWilkinson pushed a commit to LucasWilkinson/vllm that referenced this pull request Sep 8, 2026
Fuse device epoch advancement, system-scope publication, and peer waiting into one graph-replay-safe direct-KV fence kernel. Depends on vllm-project#52863.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models mrv2 Model Runner V2 specific needs-rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants