enable DCP#1641
Draft
gbyu-amd wants to merge 5 commits into
Draft
Conversation
Resolve conflicts between "[feat][DCP] Enable MLA DCP" and current main. Principle: preserve all of main's functionality; layer DCP behavior additively, gated on dcp_world_size > 1 so the default (dcp=1) path is byte-for-byte main. Conflicts resolved: - config.py / arg_utils.py: keep both DCP (-dcp) and main's PCP (-pcp) parallel config + engine args; DCP post-init assert + prefix-cache disable. - block_manager.py: keep main's can_allocate/allocate cache-hit logic, inject DCP _dcp_num_blocks()/_effective_block_size() for local block counts. - model_runner.py: pass both prefill_context_model_parallel_size and decode_context_parallel_size to aiter init_dist_env. - attention_mla.py: DCP RoPE workaround + interleaved slot_mapping + combine (all_gather LSE + cp_lse_ag_out_rs) alongside main's seg/shuffle MLA; DCP num_kv_splits = max(1, 16 // dcp_world_size). Move orphaned DCP init block (dcp_group/_cp_triton_ctx) out of dead code into __init__. - attentions/backends.py: DCP interleaved virtual_block_size slot_mapping branch alongside main's first/last-block path. - plugin/vllm/attention/layer_mla.py (renamed from plugin/attention_mla.py): main already carried DCP scaffolding but _forward_decode returned lse=None, breaking its own decode combine. Make _forward_decode return the real lse when dcp>1 (return_lse), disable persistent mode under DCP, and keep the decode slot_mapping<0 concat_and_cache workaround (adapted to main's self._k_scale / attn_metadata.slot_mapping accessors). Verified: black + ruff clean on resolved files; all 720 tests collect; relevant unit tests (scheduler, block_manager, arg_utils, quant_config) pass in isolation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gbyu-amd
marked this pull request as draft
July 20, 2026 04:46
Contributor
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
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.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist