Skip to content

[GPU] RMSFusion: support Multiply(x,x) squaring and optional Reshape#36120

Open
daijh wants to merge 1 commit into
openvinotoolkit:masterfrom
daijh:litert-rms-fusion
Open

[GPU] RMSFusion: support Multiply(x,x) squaring and optional Reshape#36120
daijh wants to merge 1 commit into
openvinotoolkit:masterfrom
daijh:litert-rms-fusion

Conversation

@daijh
Copy link
Copy Markdown

@daijh daijh commented May 29, 2026

Details:

The TFLite RMS norm decomposition (odml.rms_norm) uses Multiply(x, x) instead of Power(x, 2) for squaring, and may insert a Reshape between the Add(mean, eps) and the rsqrt Power node when keepdims=false.

Extend the RMSFusion pattern to handle:

  • Multiply(x, x) as an alternative to Power(x, 2) for squaring
  • Optional Reshape between add_eps and sqrt/rsqrt nodes

Add corresponding unit tests for the new patterns.

Tickets:

AI Assistance:

  • AI assistance used: no / yes
    • yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).
    • manual checks

The TFLite RMS norm decomposition (odml.rms_norm) uses Multiply(x, x)
instead of Power(x, 2) for squaring, and may insert a Reshape between
the Add(mean, eps) and the rsqrt Power node when keepdims=false.

Extend the RMSFusion pattern to handle:
- Multiply(x, x) as an alternative to Power(x, 2) for squaring
- Optional Reshape between add_eps and sqrt/rsqrt nodes

Add corresponding unit tests for the new patterns.
@daijh daijh requested a review from a team as a code owner May 29, 2026 06:14
@github-actions github-actions Bot added the category: transformations OpenVINO Runtime library - Transformations label May 29, 2026
@daijh daijh marked this pull request as draft May 29, 2026 06:14
@sys-openvino-ci sys-openvino-ci added the ExternalIntelPR External contributor from Intel label May 29, 2026
@daijh daijh marked this pull request as ready for review June 2, 2026 04:02
@daijh
Copy link
Copy Markdown
Author

daijh commented Jun 2, 2026

This PR is ready for review, thanks.

@daijh daijh marked this pull request as draft June 2, 2026 06:30
@daijh daijh marked this pull request as ready for review June 3, 2026 05:50
@daijh
Copy link
Copy Markdown
Author

daijh commented Jun 3, 2026

Manual verify litert-lm gemma-3n-E2B on OpenVINO-GPU.

@CuriousPanCake
Copy link
Copy Markdown
Contributor

build_jenkins

@CuriousPanCake CuriousPanCake requested a review from evkotov June 3, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: transformations OpenVINO Runtime library - Transformations ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants