Add ONNX opset 23 RMSNormalization operator support#1046
Open
AditiThirdEye wants to merge 1 commit intoonnx:10.14-GAfrom
Open
Add ONNX opset 23 RMSNormalization operator support#1046AditiThirdEye wants to merge 1 commit intoonnx:10.14-GAfrom
AditiThirdEye wants to merge 1 commit intoonnx:10.14-GAfrom
Conversation
Implements RMSNormalization operator for TensorRT ONNX parser, enabling deployment of modern transformer architectures (LLaMA, Mistral, etc.) that use RMSNorm instead of LayerNorm. Implementation details: - Computes Y = (X / sqrt(mean(X^2) + epsilon)) * scale - Supports FP32, FP16, and BF16 data types - Handles axis attribute for normalization dimensions - Supports epsilon and stash_type attributes per ONNX spec Changes: - onnxOpImporters.cpp: Add RMSNormalization importer using TensorRT primitive operations (ElementWise, Reduce, Unary) - onnxOpCheckers.cpp: Add empty checker for RMSNormalization - docs/operators.md: Add RMSNormalization to supported operators matrix - onnx_backend_test.py: Include RMSNormalization tests Fixes onnx/onnx-tensorrt#4639 (via NVIDIA/TensorRT#4639) Signed-off-by: Aditi_Pandey <54734131+AditiThirdEye@users.noreply.github.com>
d13be85 to
5ec6d8c
Compare
Author
|
@kevinch-nv @yuanyao-nv Could you please review this PR when you have a chance? This adds ONNX opset 23 RMSNormalization support, enabling deployment of modern LLM architectures (LLaMA, Mistral, etc.) that use RMSNorm. Related issue: NVIDIA/TensorRT#4639 Thanks! |
Collaborator
|
Thanks for your contribution. RMSNorm support will be available in the 10.15 release, please stay tuned. |
Author
|
Thanks @yuanyao-nv! Just to clarify - will this PR be considered for the 10.15 release, or is there already an internal implementation in progress? |
Collaborator
|
It's the latter. There is already an internal implementation ready to be released in 10.15. |
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.
Implements RMSNormalization operator for TensorRT ONNX parser, enabling deployment of modern transformer architectures (LLaMA, Mistral, etc.) that use RMSNorm instead of LayerNorm.
Implementation details:
Changes:
Fixes onnx/onnx-tensorrt#4639 (via NVIDIA/TensorRT#4639)