Repository navigation
Add activation mode to com.microsoft::GatedRMSNorm for SiLU/Swish/Sigmoid across CPU, CUDA, and WebGPU - #32512
Merged
kunal-vaishnavi merged 9 commits intoSep 18, 2026
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Extend GatedRMSNorm operator to support sigmoid-gated behavior
Add Sep 9, 2026
activation mode to com.microsoft::GatedRMSNorm for SiLU/Swish/Sigmoid across CPU, CUDA, and WebGPU
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CUDA negative sigmoid path loses precision, its stability test cannot detect that regression, and generated operator documentation is stale.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Balanced
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Ti-Tai Wang (titaiwangms)
previously approved these changes
Sep 10, 2026
This was referenced Oct 13, 2026
Open
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.
Description
com.microsoft::GatedRMSNormpreviously hardcoded SiLU gating; this PR keeps backward-compatible default behavior (silu) and adds explicit activation selection across CPU, CUDA, and native WebGPU.Schema + docs
activationtoGatedRMSNormschema with default"silu"."silu","swish"(alias),"sigmoid".CPU kernel
activationduring kernel construction.z * sigmoid(z)sigmoid(z)CUDA kernel
activationin host wrapper.LaunchGatedRMSNormKernel(no device-side string handling).WebGPU kernel
activation.CacheHintto avoid shader-cache collisions.normalized * stable_sigmoid(z)(sigmoid)normalized * (z * stable_sigmoid(z))(silu/swish)Cross-EP tests (
linear_attention_gates_op_test.cc)GatedRMSNormtest helper to take activation mode and activation attribute."silu""swish"alias parity with SiLU"sigmoid"reference parityMotivation and Context
Models can require sigmoid output gating while existing ORT
GatedRMSNormwas SiLU-only. This change enables both gating modes under the same operator ABI and keeps existing models behavior-identical by default.