Skip to content

[ROCm] Keep DeepSeek V4 on MRV1 with the wide eager attention region - #52488

Closed
Fangzhou-Ai wants to merge 1 commit into
vllm-project:mainfrom
Fangzhou-Ai:rocm/dsv4-mrv1-eager-region
Closed

[ROCm] Keep DeepSeek V4 on MRV1 with the wide eager attention region#52488
Fangzhou-Ai wants to merge 1 commit into
vllm-project:mainfrom
Fangzhou-Ai:rocm/dsv4-mrv1-eager-region

Conversation

@Fangzhou-Ai

@Fangzhou-Ai Fangzhou-Ai commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On ROCm only, restore the DeepSeek V4 defaults that #52093 and #52094 revert globally: MRV1 as the default runner, and the wide eager attention region MRV1 needs.
  • CUDA keeps MRV2 and the narrow eager region from #51430 / #51768.
  • MRV1 wraps _prepare_and_attn in _prepare_and_attn_eager; MRV2 keeps the narrow _sparse_indexer_and_attn break. Drop the MRV1+PIECEWISE rejection once the wide region is restored for MRV1.

Why this is not a duplicate of #52093 / #52094

Those PRs revert #51430 and #51768 on every platform. This PR scopes the same performance recovery to ROCm. CUDA is unchanged.

#52401 already takes this same runner-gated approach. This PR is the AMD-fork replacement for #52093/#52094 so those global reverts can close. If #52401 lands first, this PR can close as a duplicate.

Test plan

  • .venv/bin/python -m pytest tests/test_config.py::test_rocm_defaults_deepseek_v4_to_mrv1 tests/test_config.py::test_is_default_v2_model_runner_model tests/test_config.py::test_v2_model_runner_env_tri_state -v --noconftest — 23 passed
  • Pre-commit on commit: ruff, format, mypy 3.10, SPDX, config validation passed
  • Re-run gfx950 TP8 8k/1k conc4 after merge-ready CI (dsv4_rocm_bench/run_inferencex_8k1k.sh). Expected: mean TPOT ~20.5 ms / ~186 tok/s (MRV1 + wide eager). Current MRV2 default on the same box: 24.70 ms / 154.81 tok/s (#52094 table).
  • Non-thinking gsm8k on the new ROCm default. MRV2 clamp-only on this box was 0.9568 / 0.9575; MRV1 + wide eager previously scored 0.9591 / 0.9598.

Contribution notes

Made with Cursor

vllm-project#51430/vllm-project#51768 moved DSV4 to MRV2 and a narrow eager region. That is a
large decode TPOT regression on ROCm. Default ROCm back to MRV1, wrap
the full attention body in the eager break for MRV1 only, and drop the
MRV1+PIECEWISE rejection. CUDA keeps MRV2 and the narrow region.

Co-authored-by: Nick Hill <nickhill123@gmail.com>
Co-authored-by: Cursor Grok 4.6 <cursoragent@cursor.com>
Signed-off-by: fai <fangzhouai@gmail.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.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84062 for commit c940c18653d3.

@njhill

njhill commented Aug 16, 2026

Copy link
Copy Markdown
Member

@Fangzhou-Ai this should hopefully already have been resolved by #52401, could you confirm?

@njhill

njhill commented Aug 16, 2026

Copy link
Copy Markdown
Member

Actually it appears that this PR is just a duplicate of that one?

@Fangzhou-Ai

Copy link
Copy Markdown
Contributor Author

Thanks @njhill I think your solution should work, therefore I am closing this PR!

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

Labels

deepseek Related to DeepSeek models rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants