[Bugfix][KV Connector][NIXL] Support matching DCP layouts with PCP - #49342
Closed
LucasWilkinson wants to merge 3 commits into
Closed
[Bugfix][KV Connector][NIXL] Support matching DCP layouts with PCP#49342LucasWilkinson wants to merge 3 commits into
LucasWilkinson wants to merge 3 commits into
Conversation
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
from
July 21, 2026 18:39
768c1e2 to
7db1f00
Compare
1 task
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
2 times, most recently
from
July 22, 2026 15:08
5054d49 to
b80fdc1
Compare
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
from
July 23, 2026 15:12
b80fdc1 to
a61032d
Compare
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
from
July 23, 2026 21:24
a61032d to
e05b735
Compare
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
2 times, most recently
from
July 24, 2026 20:26
9b83ef9 to
bf1738d
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
3 times, most recently
from
July 28, 2026 03:11
f966cfe to
a13d854
Compare
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
from
July 28, 2026 03:59
a13d854 to
5a5f6aa
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
2 times, most recently
from
July 30, 2026 15:05
beecfee to
3cb112a
Compare
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
2 times, most recently
from
July 30, 2026 15:34
f692ed6 to
4dbafc9
Compare
Route transfers between matching DCP ranks while preserving the existing TP transfer plan. Publish one PCP replica per DCP rank and account for completion only from published replicas. Reject mismatched DCP sizes. Co-authored-by: QiuChunshuo <qiuchunshuo@huawei.com> Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com> Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
2 times, most recently
from
July 31, 2026 04:37
361d6a5 to
834d671
Compare
The DCP->PCP rank inversion was written twice: once in TransferTopology.get_target_remote_worker_keys, which used it to filter out TP ranks with no matching worker and then discarded it, and again in _nixl_handshake via _tp_dcp_to_pcp_rank to build the handshake key. Both of the helper's ValueError branches were therefore unreachable, since it only ever saw keys the filter had already accepted. Return the PCP rank alongside the routing key as a RemoteWorkerTarget so the relation is stated once, in the place that enforces it. Signed-off-by: Lucas Wilkinson <wilkinson.lucas@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
LucasWilkinson
force-pushed
the
codex/nixl-prefill-pcp
branch
from
July 31, 2026 05:17
834d671 to
ccb8f1e
Compare
LucasWilkinson
marked this pull request as ready for review
July 31, 2026 05:21
LucasWilkinson
requested review from
ApostaC,
NickLucche,
ivanium,
njhill,
orozery and
xuechendi
as code owners
July 31, 2026 05:21
Two regressions from the DCP/PCP support commit, both masked locally by a UCX initialization failure that aborted these tests earlier: - NixlBaseConnectorWorker.__init__ read get_pcp_group().rank_in_group unconditionally, unlike the dcp_rank line below it, so constructing a worker without an initialized PCP group raised AssertionError. Guard it on pcp_size like DCP already does. - test_read_blocks_for_req_expands_remote_ids builds a worker with object.__new__ and assigns attributes by hand; _read_blocks_for_req now touches _done_recving_without_xfer, which the fixture never set. Signed-off-by: Lucas Wilkinson <wilkinson.lucas@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Collaborator
Author
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.
Purpose
Add DCP-aware NIXL P/D transfer support that composes with prefill PCP without changing attention or token-interleaving behavior.
This change:
(pp_rank, tp_rank, pcp_rank)handshake keys and(pp_rank, tp_rank, dcp_rank)remote-agent keys;tp_rank % dcp_sizemapping;The connector remains layout-opaque: it selects matching workers and copies KV blocks. PCP/DCP attention chunking, empty attention shards, decoder-side PCP, and unequal-DCP token-position remapping are outside this PR.
Related work and duplicate check
Open-PR searches for NIXL PCP/DCP and context-parallel NIXL changes found #38433, #45340, and this draft; no other open PR combines the reduced equal-DCP transfer path with PCP replica ownership.
Test plan and results
.venv/bin/python -m pytest tests/v1/kv_connector/unit/test_handshake_pp_aggregation.py tests/v1/kv_connector/unit/test_nixl_connector.py::TestNixlHandshake::test_consumer_rejects_pcp tests/v1/kv_connector/unit/test_nixl_connector.py::TestNixlHandshake::test_pcp_producer_publishes_one_replica_per_dcp_rank tests/v1/kv_connector/unit/test_nixl_connector.py::TestNixlHandshake::test_pcp_producer_waits_only_for_published_replicas tests/v1/kv_connector/unit/test_nixl_connector.py::TestNixlHandshake::test_prefill_tp_size_greater_than_decode_tp_size tests/v1/kv_connector/unit/test_nixl_connector.py::TestNixlHandshake::test_prefill_tp_size_greater_than_decode_tp_size_mla tests/v1/kv_connector/unit/test_nixl_push_connector.py::TestPushPipelineParallel tests/v1/kv_connector/unit/test_nixl_push_connector.py::TestPushWriterMlaReplication tests/v1/kv_connector/unit/test_transfer_topology_sharded.py -q # 17 passedA final-branch four-GPU TP1+PCP2+DCP2+EP2 prefiller to TP2+DCP2 decoder run was attempted. NIXL initialized and model loading completed, but current
maindeadlocked before the first transfer during PCP×DCP attention warmup: the non-empty PCP worker entered the DCP collective while its empty-context peer skipped it. Because this is a core PCP×DCP attention issue rather than connector behavior, this PR does not add a failing integration job for that topology.Earlier development on a larger superset branch completed both 1,319-example DeepSeek-V2-Lite-Chat GSM8K evaluations for TP1+PCP2+DCP2 to TP2+DCP2 and TP2+PCP2+DCP4 to TP4+DCP4 within the required accuracy band. Those runs also contained separate attention and MRV2 fixes that are not in this connector PR, so they are not final-branch validation.
AI assistance disclosure
OpenAI Codex assisted with investigation, implementation, testing, and drafting this PR.
Reviewed by the human submitter