Skip to content

[ROCm][BugFix] Fix Qwen3-30B-A3B FP16 decode/TTFT regression from lost MoE weight padding - #1408

Draft
stoivonen-amd wants to merge 1 commit into
gfx11from
stephant/rocm-restore-moe-padding
Draft

stoivonen-amd wants to merge 1 commit into
gfx11from
stephant/rocm-restore-moe-padding

Conversation

@stoivonen-amd

@stoivonen-amd stoivonen-amd commented Oct 27, 2026 •

Copy link
Copy Markdown

Purpose

Port of vllm-project#61872 (pending upstream).

Since upstream vllm-project#46009 replaced the .data rebind with .data.copy_(), ROCm MoE weight padding (VLLM_ROCM_MOE_PADDING) has been a no-op for unquantized Triton MoE: copying back into the dense storage drops the padded row stride.

Rebind .data to the padded storage again, and pad only on initial load (moe_kernel is None) so post-capture weight updates keep the CUDA graph storage addresses. Upstream's tests are not ported; their test file is not on this branch.

Test Result

Qwen3-30B-A3B-Instruct-2507 FP16 on gfx1151, CUDA graphs on, concurrency 1, 128 in / 128 out (mean of 2 runs per arm):

Memory consumed TTFT TPOT Output tok/s
gfx11 58.21 GiB 337.6 ms 37.73 ms 25.0
this PR 76.87 GiB 182.6 ms (−46%) 30.25 ms (−20%) 31.6 (+26%)
this PR, VLLM_ROCM_MOE_PADDING=0 58.08 GiB 323.1 ms 37.78 ms 25.1

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.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

…t MoE weight padding

Port of vllm-project#61872 (pending upstream).

Since upstream vllm-project#46009 replaced the `.data` rebind with `.data.copy_()`,
ROCm MoE weight padding (VLLM_ROCM_MOE_PADDING) has been a no-op for
unquantized Triton MoE: copying back into the dense storage drops the
padded row stride.

Rebind `.data` to the padded storage again, and pad only on initial load
(`moe_kernel is None`) so post-capture weight updates keep the CUDA graph
storage addresses. Upstream's tests are not ported; their test file is
not on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Stephan Toivonen <Stephan.Toivonen@amd.com>
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.

1 participant