Skip to content

[AMD][DCP] Close two decode-LSE holes left by AITER DCP support - #54639

Closed
okorzh-amd wants to merge 2 commits into
vllm-project:mainfrom
okorzh-amd:okorzh/aiter-mla-dcp-decode-lse
Closed

okorzh-amd wants to merge 2 commits into
vllm-project:mainfrom
okorzh-amd:okorzh/aiter-mla-dcp-decode-lse

Conversation

@okorzh-amd

@okorzh-amd okorzh-amd commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

#51705 gave the AITER MLA backend a decode LSE under decode context parallelism, so a DCP rank can hand its partial attention to the cross-shard merge. Two ways to reach that merge without an LSE remain.

Gluon. use_gluon_decode takes no DCP argument, unlike its sibling use_gluon_verify, and the Gluon single-token branch in forward_mqa ends return o, None. Nothing structural keeps DCP off it -- only arithmetic: the builder passes the gathered head count, and Gluon bails at >= 16 heads, which every realistic DCP layout exceeds (Kimi-K3 at TP8/DCP8 gathers 12 x 8 = 96). At 6 local heads and DCP2 it gathers 12 and Gluon takes the batch, returning no LSE and tripping a bare assert lse is not None in the MLA layer. That shape is not hypothetical; it is the one the existing DCP decode test uses. Give the predicate a dcp_world_size and exclude DCP, matching verify.

AITER capability. The DCP branch needs an AITER build whose mla_decode_fwd accepts return_lse=True. Nothing checks that at configuration time, so an older build loads the whole model and fails at the first decoded token on an assertion that names neither AITER nor the version. Probe the signature once and raise at construction instead.

Neither changes any kernel selection for a supported configuration.

Test Plan

Test: tests/v1/attention/test_rocm_aiter_mla_fp8_decode_routing.py
tests/v1/attention/test_rocm_aiter_mla_mtp_split.py
565 passed, against 505 on the same commit without this change --
the delta is exactly the added cases, no regressions.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

vllm-project#51705 gave the AITER MLA backend a decode LSE under decode context
parallelism, so a DCP rank can hand its partial attention to the
cross-shard merge. Two ways to reach that merge without an LSE remain.

Gluon. `use_gluon_decode` takes no DCP argument, unlike its sibling
`use_gluon_verify`, and the Gluon single-token branch in `forward_mqa`
ends `return o, None`. Nothing structural keeps DCP off it -- only
arithmetic: the builder passes the gathered head count, and Gluon bails
at >= 16 heads, which every realistic DCP layout exceeds (Kimi-K3 at
TP8/DCP8 gathers 12 x 8 = 96). At 6 local heads and DCP2 it gathers 12
and Gluon takes the batch, returning no LSE and tripping a bare
`assert lse is not None` in the MLA layer. That shape is not
hypothetical; it is the one the existing DCP decode test uses. Give the
predicate a `dcp_world_size` and exclude DCP, matching verify.

AITER capability. The DCP branch needs an AITER build whose
`mla_decode_fwd` accepts `return_lse=True`. Nothing checks that at
configuration time, so an older build loads the whole model and fails at
the first decoded token on an assertion that names neither AITER nor the
version. Probe the signature once and raise at construction instead.

Neither changes any kernel selection for a supported configuration.

Test: tests/v1/attention/test_rocm_aiter_mla_fp8_decode_routing.py
      tests/v1/attention/test_rocm_aiter_mla_mtp_split.py
      565 passed, against 505 on the same commit without this change --
      the delta is exactly the added cases, no regressions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Oxana Korzh <okorzh@amd.com>

@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.

@mergify mergify Bot added the rocm Related to AMD ROCm label Aug 31, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Aug 31, 2026
Comments, docstrings and the error string only; no behavior change.
565 tests still pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Oxana Korzh <okorzh@amd.com>
@okorzh-amd

Copy link
Copy Markdown
Contributor Author

PR #54546 resolves the issue. Closing this one

@okorzh-amd okorzh-amd closed this Aug 31, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant