Skip to content

[Bugfix] Platform-aware DCP error message for ROCm - #55188

Open
renruirui1234 wants to merge 2 commits into
vllm-project:mainfrom
renruirui1234:fix/rocm-error-messages
Open

renruirui1234 wants to merge 2 commits into
vllm-project:mainfrom
renruirui1234:fix/rocm-error-messages

Conversation

@renruirui1234

Copy link
Copy Markdown

Summary

  • Replace the DCP assert with a ValueError that includes platform-specific guidance.
  • On ROCm: states that no LSE-capable backend is available and DCP cannot be used.
  • On other platforms: suggests trying --attention-backend or disabling DCP.

Motivation

Fixes #54761. On ROCm, no attention backend returns softmax LSE during decode, making DCP impossible. The previous message suggested --attention-backend, which is unhelpful on ROCm.

Not duplicating an existing PR

No open PR addresses this issue (verified via gh pr list).

Test plan

  • Code review of error paths
  • Import of current_platform verified

AI assistance disclosure

This PR was developed with AI assistance (Trae AI). All changes have been reviewed by the human submitter.

@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 rocm Related to AMD ROCm bug Something isn't working labels Sep 3, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 82012796-0a65-4211-9efc-0879bccf6451

📥 Commits

Reviewing files that changed from the base of the PR and between d4d703c and c524649.

📒 Files selected for processing (1)
  • vllm/v1/worker/cp_utils.py

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation for attention configuration compatibility during decoding.
    • Replaced an unclear internal assertion failure with a descriptive error message.
    • Added platform-specific guidance, including backend switching or disabling the affected configuration when supported.
    • On ROCm platforms, errors now clearly indicate when no compatible attention backend is available.

Walkthrough

The DCP compatibility check now imports current_platform and raises a platform-specific ValueError when the selected attention implementation cannot return softmax LSE during decode.

Changes

DCP compatibility validation

Layer / File(s) Summary
Platform-aware DCP validation
vllm/v1/worker/cp_utils.py
The DCP decode LSE assertion is replaced with ValueError. ROCm reports that no LSE-capable backend is available. Other platforms suggest changing --attention-backend or disabling DCP.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c5246

DCP configurations without decode softmax-LSE support now fail with actionable platform-specific guidance, including clear ROCm unavailability messaging. No current merge-readiness risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: a platform-aware DCP error message for ROCm.
Description check ✅ Passed The description accurately explains the DCP error change, ROCm-specific behavior, non-ROCm guidance, motivation, and scope.
Linked Issues check ✅ Passed The change satisfies the directly linked issue's DCP objective [#54761] by replacing the assertion with an always-active ValueError and providing ROCm-specific guidance. The linked issue's separate KV…
Out of Scope Changes check ✅ Passed The changes are limited to the requested DCP error handling and platform-specific guidance. No unrelated code changes are described.
Full details: Linked Issues check

Explanation

The change satisfies the directly linked issue's DCP objective [#54761] by replacing the assertion with an always-active ValueError and providing ROCm-specific guidance. The linked issue's separate KV-cache dtype objective is explicitly outside this PR's scope.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run for upstream CI or /amd-ci run for AMD CI only whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use the corresponding /ci run, /ci retry, and /ci cancel commands, or their /amd-ci variants. New commits do not start upstream CI automatically.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

On ROCm, no attention backend currently returns softmax LSE during
decode, making Decode Context Parallelism (DCP) impossible. The
previous assertion suggested trying --attention-backend, which is
unhelpful since no suitable backend exists on the platform.

Replace the assert with a ValueError that includes platform-specific
guidance: on ROCm it states that DCP is not available, on other
platforms it suggests switching backends.

Also converts assert to raise ValueError so the error survives
python -O.

Closes vllm-project#54761

Co-authored-by: Trae AI Assistant
Signed-off-by: renrui <renrui.1234@bytedance.com>
@renruirui1234
renruirui1234 force-pushed the fix/rocm-error-messages branch from c524649 to 5c27be3 Compare September 4, 2026 03:15
@tjtanaa tjtanaa added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 10, 2026
@github-actions

Copy link
Copy Markdown

@renruirui1234, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@tjtanaa

tjtanaa commented Sep 10, 2026

Copy link
Copy Markdown
Member

#55780 supports dcp with lse right now. So this PR needs to be reevaluated.

@tjtanaa tjtanaa removed the ready ONLY add when PR is ready to merge/full CI is needed label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rocm Related to AMD ROCm

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[Bug]: On ROCm, DCP and non-FP8 KV dtypes are unreachable, but the errors suggest fixes that don't exist there

2 participants