Skip to content

enable DCP#1641

Draft
gbyu-amd wants to merge 5 commits into
mainfrom
guanbao/dcp
Draft

enable DCP#1641
gbyu-amd wants to merge 5 commits into
mainfrom
guanbao/dcp

Conversation

@gbyu-amd

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

yitingw1 and others added 4 commits May 18, 2026 14:32
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
gbyu-amd marked this pull request as draft July 20, 2026 04:46
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Run after the PR is approved and Pre Checkin passes
  • ✅ Run immediately when an approval review is submitted
  • ✅ Can be requested before approval with labels
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, and SGLang
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests

Heavy jobs are skipped when the PR is not approved and no matching ci:* label is present.
Add labels via the sidebar or gh pr edit 1641 --add-label <label>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants