Repository navigation
[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
Draft
stoivonen-amd wants to merge 1 commit into
stoivonen-amd wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Port of vllm-project#61872 (pending upstream).
Since upstream vllm-project#46009 replaced the
.datarebind 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
.datato 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):
gfx11VLLM_ROCM_MOE_PADDING=0Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.