sycl: add RMS_NORM_BACK operation support#16808
Merged
NeoZhangJianyu merged 9 commits intoggml-org:masterfrom Oct 29, 2025
Merged
sycl: add RMS_NORM_BACK operation support#16808NeoZhangJianyu merged 9 commits intoggml-org:masterfrom
NeoZhangJianyu merged 9 commits intoggml-org:masterfrom
Conversation
…epoint before further changes
Implement RMS_NORM_BACK for the SYCL backend using FP32 compensated parallel reduction. Minimal docs updates (ops.md / SYCL.csv).
Contributor
Author
|
This PR is ready for review. |
Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
NeoZhangJianyu
approved these changes
Oct 28, 2025
Contributor
NeoZhangJianyu
left a comment
There was a problem hiding this comment.
It's good job!
Thank you!
Contributor
|
@YaelLogic |
Contributor
Author
|
Hi @NeoZhangJianyu, |
Anico2
added a commit
to Anico2/llama.cpp
that referenced
this pull request
Jan 15, 2026
* sycl: add RMS_NORM_BACK operation support * sycl: rms_norm_back: add dual reduction paths (FP64 and FP32) and savepoint before further changes * sycl: add RMS_NORM_BACK support Implement RMS_NORM_BACK for the SYCL backend using FP32 compensated parallel reduction. Minimal docs updates (ops.md / SYCL.csv). * revert: restore .gitignore and tools/run/CMakeLists.txt to upstream * revert: restore tests/CMakeLists.txt to upstream * sycl: optimize rms_norm_back * fix: restore SYCL.csv to correct state with RMS_NORM_BACK support * Update ggml/src/ggml-sycl/norm.cpp Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com> * fix: remove trailing whitespace and add missing newline (EditorConfig) --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
* sycl: add RMS_NORM_BACK operation support * sycl: rms_norm_back: add dual reduction paths (FP64 and FP32) and savepoint before further changes * sycl: add RMS_NORM_BACK support Implement RMS_NORM_BACK for the SYCL backend using FP32 compensated parallel reduction. Minimal docs updates (ops.md / SYCL.csv). * revert: restore .gitignore and tools/run/CMakeLists.txt to upstream * revert: restore tests/CMakeLists.txt to upstream * sycl: optimize rms_norm_back * fix: restore SYCL.csv to correct state with RMS_NORM_BACK support * Update ggml/src/ggml-sycl/norm.cpp Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com> * fix: remove trailing whitespace and add missing newline (EditorConfig) --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* sycl: add RMS_NORM_BACK operation support * sycl: rms_norm_back: add dual reduction paths (FP64 and FP32) and savepoint before further changes * sycl: add RMS_NORM_BACK support Implement RMS_NORM_BACK for the SYCL backend using FP32 compensated parallel reduction. Minimal docs updates (ops.md / SYCL.csv). * revert: restore .gitignore and tools/run/CMakeLists.txt to upstream * revert: restore tests/CMakeLists.txt to upstream * sycl: optimize rms_norm_back * fix: restore SYCL.csv to correct state with RMS_NORM_BACK support * Update ggml/src/ggml-sycl/norm.cpp Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com> * fix: remove trailing whitespace and add missing newline (EditorConfig) --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
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.
Summary
Add SYCL backend support for
RMS_NORM_BACKusing a single FP32 compensated parallel reduction path.No changes to the public API. Default numerical accuracy is preserved; a fast opt-in macro is also available.
Implementation
Algorithm (onsistent with existing backend behavior)
What was implemented
Σ x²andΣ x·dzwith Kahan-style compensation.sub_group) reduction viawarp_reduce_sum.group_broadcastused to distributeinv_randcoeffacross the work-group.WARP_SIZE, capped by device limit (≤256), not larger thanD.Optional fast path
GGML_SYCL_RMS_BACK_FASTto disable compensated summation and use plain FP32 accumulation.Validation
Focused tests executed locally:
Build is warning-free for this code path.
Reproduce (build + test)
Files Changed (minimal scope only)
ggml/src/ggml-sycl/norm.cppggml_sycl_op_rms_norm_backggml/src/ggml-sycl/ggml-sycl.cppggml/src/ggml-sycl/norm.hppdocs/ops.mddocs/ops/SYCL.csvNo unrelated files or personal data included.
Notes & Risks
Reviewers
cc @CISC @NeoZhangJianyu
Looking forward to your feedback. Thanks in advance!