-
Notifications
You must be signed in to change notification settings - Fork 3k
[GPU] Support RMS Normalization Fusion without Learnable Affine Parameters #33861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[GPU] Support RMS Normalization Fusion without Learnable Affine Parameters #33861
Conversation
ffcc2cc to
4f171cd
Compare
src/common/transformations/src/transformations/common_optimizations/rms_fusion.cpp
Outdated
Show resolved
Hide resolved
cb5fb50 to
b81eeee
Compare
ed3a4b9 to
1c481aa
Compare
e-ddykim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me for the GPU part
d64f73e to
5068afd
Compare
|
@CuriousPanCake Could you review this PR? |
src/common/transformations/src/transformations/common_optimizations/rms_fusion.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/src/transformations/common_optimizations/rms_fusion.cpp
Show resolved
Hide resolved
src/common/transformations/src/transformations/common_optimizations/rms_fusion.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/src/transformations/common_optimizations/rms_fusion.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/rms_norm_decomposition_test.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, review the comments for the Transformations part
183a896 to
c9a0bbb
Compare
e0d9a76 to
c499127
Compare
|
@CuriousPanCake Could you please review the updated code that apply your comments again? |
e5ebd49 to
e008c30
Compare
|
@dmatveev, this PR is breaking some NPUW func test. Please have a look. |
e7d36da to
757801a
Compare
Signed-off-by: Andrew Park <[email protected]>
Signed-off-by: Andrew Park <[email protected]>
|
Details:
elementwise_affine=False(equivalent to Pytorch RMS's attribute), RMS normalization does not include learnable gamma parameters. The gamma is implicitly fixed to ones, reducing the decomposed graph patternfrom:
x → Power(2) → ReduceMean → Add(eps) → Sqrt → Divide(1/√) → Multiply(x, 1/√) → Multiply(gamma)to:
x → Power(2) → ReduceMean → Add(eps) → Sqrt → Divide(1/√) → Multiply(x, 1/√) [NO gamma multiplication]Tickets: