Skip to content

[Bugfix][PCP][DCP] Respect interleave in indexer KV gather mapping - #56715

Merged
LucasWilkinson merged 2 commits into
vllm-project:mainfrom
LucasWilkinson:codex/pcp-interleave-index-mapping
Sep 13, 2026
Merged

LucasWilkinson merged 2 commits into
vllm-project:mainfrom
LucasWilkinson:codex/pcp-interleave-index-mapping

Conversation

@LucasWilkinson

@LucasWilkinson LucasWilkinson commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

PCP’s index gather assumes interleave 1. With DCP4/interleave64, token 1 reads the key for token 64. Use the configured interleave when mapping gathered shards back to token positions, and keep padded gathers in bounds. No new kernel.

Separate from #55802, which removes the interleave restriction; this PR leaves that guard unchanged. Duplicate searches found no open PR fixing this PCP gather mapping.

Validation on main b6e2aa748b: 72 ordering cases passed (CPU; device copies stubbed), covering interleave1/64, DCP2/4/8, short/boundary contexts and split request rows. Restoring the old arithmetic fails all 36 interleave64 cases. Pre-commit/mypy passed.

CUDA_VISIBLE_DEVICES='' .venv/bin/python -m pytest tests/v1/attention/test_indexer_dcp_localize.py -k pcp_plan_deinterleave_restores_global_order -q

Combined-head GLM-5.2-NVFP4 PCP4+TP1+EP4+DCP4 → TP4 tests passed in eager and CUDA-graph modes: GPU and CPU-offload each 28/32 GSM8K, direct TP4 26/32 in both runs. All 32 GPU/CPU pairs matched tokens/log probabilities in each run, with confirmed CPU hits; 6,155-token retrieval also passed (6,144 CPU-restored tokens; continuations differed). Zero transfer failures or pending stores. PCP requires -cc.cudagraph_mode=PIECEWISE; its default FULL_AND_PIECEWISE fails startup. Graph run captured prefiller sizes 4–1024 and logged 100 PIECEWISE prefiller / 8,432 FULL decoder dispatches. Uses default breakable graphs, not torch.compile. Clean merge: main b6e2aa748b, #56645 f995e33f61, #55802 10afd0150e, #56715 899a24c572; merged #56621, managed precompiled native extensions, no optional top-k changes. Small sample, not a full accuracy benchmark. UCX errors occurred only during teardown; GPUs released.

AI assistance: OpenAI Codex. Draft pending human review and validation.

Co-authored-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
@mergify mergify Bot added the bug Something isn't working label Sep 13, 2026
@LucasWilkinson
LucasWilkinson marked this pull request as ready for review September 13, 2026 18:31

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@LucasWilkinson

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #88671 for commit 7105db338b54.

@LucasWilkinson
LucasWilkinson enabled auto-merge (squash) September 13, 2026 18:32
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 13, 2026
Co-authored-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
@LucasWilkinson

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #88673 for commit 899a24c572df.

@LucasWilkinson
LucasWilkinson merged commit 586f652 into vllm-project:main Sep 13, 2026
148 of 149 checks passed
ItsRoy69 pushed a commit to ItsRoy69/vllm that referenced this pull request Sep 15, 2026
…llm-project#56715)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
keneoneth pushed a commit to keneoneth/vllm that referenced this pull request Sep 16, 2026
…llm-project#56715)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants