Repository navigation
Conversation
Pass the two completed expert outputs to the next AttnResFwd for eligible sequence-parallel layers. Preserve the BF16 rounding of the original expert add before folding the result into the residual prefix. Signed-off-by: liao (R) <l00940005@china.huawei.com>
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Signed-off-by: liao (R) <l00940005@china.huawei.com>
Contributor
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. 🤖 How to trigger CI
Note Until the CI gate has run on a commit, the required |
This branch has not been deployed
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.
What this PR does / why we need it?
Kimi latent MoE normally launches a separate elementwise add for the shared and routed expert outputs. The next layer's AttnResFwd then reads that temporary result and folds it into its residual prefix.
For eligible sequence-parallel layers on Ascend A3, pass both expert outputs to the next AttnResFwd after their existing communication and routed output projection. The existing arch22 kernel can then form
BF16(prefix + BF16(shared + routed))before it reads or writes the residual bank. This removes the standalone MoE tail add from that path.The expert handoff and intermediate BF16 rounding follow the approach in #24470. This change integrates them with the existing A3 kernel. The regular MoE output path still serves auxiliary captures, pipeline boundaries, the final layer, and superkernel mode.
Does this PR introduce any user-facing change?
Yes. The A3 optimization is selected automatically for compatible Kimi latent MoE layers. No configuration change is needed.
How was this patch tested?
Static checks passed with
git diff --checkand Python syntax parsing of the changed files. Added an A3 operator comparison against the existing explicit expert add, including a BF16 halfway value, residual bank writeback, and mixed and unmixed outputs. The regression test, NPU build, model accuracy, and profiling comparison are pending.Checklist
Testing
Boundary / edge-case coverage
Regression test
Error / failure path coverage
Meaningful & reliable tests
Performance impact
vLLM main: vllm-project/vllm@65ada0c