Repository navigation
Optimize MUSA custom allreduce RMSNorm fusion - #140
Merged
Joey-gvwal merged 5 commits intoJul 30, 2026
Merged
Joey-gvwal merged 5 commits into
Joey-gvwal merged 5 commits into
Conversation
Elon-yf
force-pushed
the
perf/musa-custom-allreduce-rmsnorm-fusion
branch
from
July 30, 2026 08:13
1343c91 to
c40d22f
Compare
Add the MUSA JIT kernels and Inductor rewrite for fused custom all-reduce and RMSNorm. Reuse the lifecycle-managed communicator registry and limit the TP4 rows=64 two-shot launch to 32 blocks by default.
Elon-yf
force-pushed
the
perf/musa-custom-allreduce-rmsnorm-fusion
branch
from
July 30, 2026 08:25
c40d22f to
18a7fee
Compare
Joey-gvwal
reviewed
Jul 30, 2026
Joey-gvwal
reviewed
Jul 30, 2026
Joey-gvwal
reviewed
Jul 30, 2026
Author
|
-cc.mode=VLLM_COMPILE |
Collaborator
|
Please clarify whether the current default path uses the fused optimization. |
Joey-gvwal
pushed a commit
that referenced
this pull request
Aug 3, 2026
* Optimize MUSA custom allreduce RMSNorm fusion Add the MUSA JIT kernels and Inductor rewrite for fused custom all-reduce and RMSNorm. Reuse the lifecycle-managed communicator registry and limit the TP4 rows=64 two-shot launch to 32 blocks by default. * Refine fused allreduce runtime defaults * Clean up fused allreduce diagnostics * Fail closed unsupported allreduce RMSNorm rewrites * Harden MUSA allreduce RMSNorm fusion guards --------- Co-authored-by: Xiaodong Ye <yexiaodong60@mthreads.com> Co-authored-by: Elon Gao <elon.gao@mthread.com> (cherry picked from commit 782fe45)
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.
Optimize MUSA custom allreduce RMSNorm fusion
Summary
This PR adds and wires the MUSA JIT custom allreduce + RMSNorm fused path for
the supported tensor-parallel world sizes (TP2/TP4/TP8). It includes
graph-safe registered-input handling and keeps the existing behavior as the
fallback when the feature is disabled or a shape is not eligible. The
included serving matrix covers TP2 and TP4.
Key changes:
bindings, including residual-output variants.
captured graphs use registered input pointers without a per-replay copy.
cannot become stale or remain placeholder data.
rows=64two-shot kernel to 32 blocks to reducesynchronization overhead.
test:
Serving performance used Qwen3.5-35B-A3B BF16/FP8 with TP4 and
Qwen3.5-27B BF16/FP8 with TP2 on S5000. This PR reports only 4096→1024;
batch sizes are 1/4/16/64. Baseline is the paired mean of two disabled control
runs; Fused is the enabled run. Throughput
+is better; TTFT/TPOT/E2E-is better.
Source contract test:
Serving command used for each control/fused run:
The three runs use the disabled/fused/disabled feature settings. The server
uses TP4 for 35B or TP2 for 27B,
max_model_len=5184,max_num_seqs=64,FLASH_ATTN, normal graph capture, and no eager or compile-disabling flags.Focused repeated validation:
1729.47 → 1730.60 tok/s(+0.065%).4168.08 → 4088.73 ms(-1.904%).32.313 → 32.351 ms(+0.116%).37224.35 → 37183.33 ms(-0.110%).Functional and source validation:
PASS: all three semantic smoke requests returned the expected response.PASS: all 8 changed feature-file hashes match the candidate commit.PASS: candidate commitb4a2e8b94f10c92ff1e04bd19dda664e7f8b035dhas tree2b1b12a1eef9f2c0166d563bb8ba32987ff593bc, identical to the tested tree.PASS: no textual merge conflict againstv0.24.0-dev@6c7ef2f8d4939de2f76f17990419258663456e2c.Evidence boundary: