Skip to content

[KV Connector][NIXL] Support MRV2 prefill PCP replicas - #2

Closed
LucasWilkinson wants to merge 23 commits into
codex/fix-pcp-empty-context-mergefrom
codex/nixl-prefill-pcp
Closed

[KV Connector][NIXL] Support MRV2 prefill PCP replicas#2
LucasWilkinson wants to merge 23 commits into
codex/fix-pcp-empty-context-mergefrom
codex/nixl-prefill-pcp

Conversation

@LucasWilkinson

@LucasWilkinson LucasWilkinson commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Note: This PR is stacked on vllm-project#49294 and should be retargeted to main after it merges.

Purpose

Support NIXL P/D disaggregation when an MRV2 prefill producer uses Prefill Context Parallelism (PCP) and the decode consumer remains PCP1/DCP1.

MRV2 PCP gathers prefill K/V inputs before cache insertion, so PCP replicas at the same TP/PP position own the same complete KV shard. NIXL handshake metadata is keyed by PP/TP only; publishing every PCP replica therefore overwrites the same identity and makes completion aggregation wait for or process duplicate producer events.

This change:

  • selects PCP rank 0 as the canonical producer KV replica;
  • excludes non-canonical PCP replicas from producer handshake publication;
  • aggregates producer completion over canonical TP x PP workers;
  • suppresses duplicate finished_sending events from non-canonical replicas while still allowing their local cleanup; and
  • extends the NIXL accuracy launcher with PREFILLER_PCP_SIZE.

The validated topology is:

Prefill producer: TP1 + PCP2 + EP2 + PP1
Decode consumer:  TP1 + PCP1/DCP1
Connector:        NixlPullConnector

Related work and duplicate check

Live searches for NIXL PCP, prefill context parallel NIXL, replica selection, and completion handling found no open PR implementing this NIXL ownership fix.

Test plan and results

Focused PCP/NIXL regression coverage:

.venv/bin/python -m pytest tests/v1/kv_connector/unit/test_nixl_connector.py -k 'pcp_producer or pcp_consumer or pcp_non_publishing' -q

Result: 5 passed, 68 deselected.

Full NIXL connector unit file:

.venv/bin/python -m pytest tests/v1/kv_connector/unit/test_nixl_connector.py -q

Result: pytest reported 73 passed in 176.91 seconds. The process subsequently segfaulted during UCX shared-library teardown in rtnl_tc_unregister, after the completed pytest result.

DeepSeek-V2-Lite-Chat NIXL P/D GSM8K:

MODEL_NAMES=deepseek-ai/DeepSeek-V2-Lite-Chat PREFILLER_PCP_SIZE=2 PREFILLER_TP_SIZE=1 DECODER_TP_SIZE=1 GPU_MEMORY_UTILIZATION=0.3 PREFILL_BLOCK_SIZE=128 DECODE_BLOCK_SIZE=128 VLLM_SERVE_EXTRA_ARGS=--max-model-len,4096,--max-num-seqs,128,--max-num-batched-tokens,32768,--trust-remote-code,--enable-expert-parallel,--moe-backend,flashinfer_cutlass bash tests/v1/kv_connector/nixl_integration/run_accuracy_test.sh

Result: all 1,319 questions completed, with strict-match accuracy 0.6535253980; expected 0.65 ± 0.05. The pytest evaluation passed in 112.14 seconds. The shell wrapper received a cleanup signal while terminating the prefill/decode servers after the passing result.

Pre-commit passed on all four changed files, including ruff, mypy, shellcheck, sign-off, and repository policy hooks. git diff --check passed. A static GPU-sync audit found no new host-device synchronization calls.

AI assistance disclosure

OpenAI Codex assisted with investigation, implementation, testing, evaluation, and drafting this PR.

  • The human submitter has reviewed every changed line, understands the change end-to-end, and can defend it during review.

stefankoncarevic and others added 23 commits July 21, 2026 18:54
…dled_fp8_variants (MI355) (vllm-project#49329)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…llm-project#49380)

Signed-off-by: pei.zhang <pei.zhang@amd.com>
Co-authored-by: Claude <noreply@anthropic.com>
…pdates (vllm-project#49178)

Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
…ng the new MK oracle scheme. (vllm-project#44120)

Signed-off-by: Bill Nell <bnell@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mgoin <mgoin64@gmail.com>
…m-project#49294)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
…ime HIP init) (vllm-project#47992)

Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
…oject#49396)

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
…#49297)

Signed-off-by: ZeldaHuang <zelda.huanghuang@gmail.com>
…t#49374)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
Signed-off-by: xiaolong <xiaolong.guo@intel.com>
…ing models online serving. (vllm-project#49153)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Select PCP rank zero as the canonical producer KV replica and suppress duplicate producer completion events from non-canonical ranks. Extend the NIXL accuracy launcher and unit coverage for prefill PCP.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
@LucasWilkinson
LucasWilkinson force-pushed the codex/nixl-prefill-pcp branch from 7db1f00 to 5054d49 Compare July 22, 2026 14:10
@LucasWilkinson

Copy link
Copy Markdown
Owner Author

Superseded by reopened upstream draft vllm-project#49342, now rebased directly onto current main.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.