Repository navigation
Refactor: Migrate add_rmsnorm_bias+rmsnorm_without_weight+rmsnorm_split to operator framework - #889
Merged
iforgetmyname merged 3 commits intoOct 28, 2026
Conversation
MatsueYu
force-pushed
the
refactor/add-rmsnorm-bias
branch
2 times, most recently
from
October 27, 2026 07:00
c21ddef to
656742e
Compare
Todobe
reviewed
Oct 27, 2026
Todobe
reviewed
Oct 27, 2026
Collaborator
|
Optimize the description, delete the chat content. |
Todobe
reviewed
Oct 27, 2026
MatsueYu
force-pushed
the
refactor/add-rmsnorm-bias
branch
from
October 28, 2026 01:43
656742e to
d0f921f
Compare
MatsueYu
force-pushed
the
refactor/add-rmsnorm-bias
branch
from
October 28, 2026 01:52
d0f921f to
5816fad
Compare
Contributor
Author
|
Contributor
Author
modified |
Todobe
approved these changes
Oct 28, 2026
WayneLuo-HW
approved these changes
Oct 28, 2026
sglang-npu-bot
approved these changes
Oct 28, 2026
iforgetmyname
approved these changes
Oct 28, 2026
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.
refactoring add_rmsnorm_bias, rmsnorm_without_weight, rmsnorm_split for new kernel sturctures
related to Refactor: Ops Architecture - #869
Test
Test design
1.
add_rmsnorm_bias— 120 cases3 dtypes × 5 shapes × 4 modes × 2 eps(1, 4096)(16, 7168)(3, 6144)(1, 1)(7, 2049)normalzerooffset_onlyquantizedquantizeduses per-columnx/residual = ±0.25/±0.75(sum±1),weight=1,bias=0,scale ∈ {0.5, 2.0, 200.0, 200.0},offset=0.25, so the normal, truncation and+127/-128saturation paths are all deterministic.2.
rmsnorm_without_weight— 90 cases3 dtypes × 5 shapes × 3 modes × 2 eps(1, 130, 2048)(2, 16, 2048)(2, 1, 4096)(1, 1, 2048)(1, 65, 2048)block_l=64normalzeroconstantAll
Cvalues are powers of two because the kernel reduces withtl.arange(0, C).3.
fused_variance+fused_rsqrt_mul— 75 casesfused_variancefused_rsqrt_mul(1,1024,512),(1,8190,512),(2,4096,2048),(1,1,512),(1,65,1024)(1,8190,2560),(1,1024,512),(2,4096,640),(1,1,128),(3,17,100)C=100[B,L,1],[B*L]normal,zero,constantxand shardedweightto fp32 before this pathNo multi-rank
all_reduceis exercised: the operators are single-rank phases and the collective stays in sglang.Accuracy and performance policy
auto(= Triton) vstorch_nativeatol=rtol=1e-5atol=rtol=1e-3atol=rtol=5e-2atol=rtol=0)perf_shape+ dtype + modeAccuracy Test
add_rmsnorm_bias
rmsnorm_without_weight
rmsnorm_split
Performance Test