Skip to content

hexagon: fuse post-norm residual add into RMS_NORM_MUL (#31822) - #472

Draft
bri-prism wants to merge 1 commit into
prismfrom
codex/upstream-perf-hexagon
Draft

bri-prism wants to merge 1 commit into
prismfrom
codex/upstream-perf-hexagon

Conversation

@bri-prism

Copy link
Copy Markdown
Collaborator

Ports ggml-org#31822.

Independent cherry-pick for Gemma post-norm graphs. Validate HTP dispatch and output on target hardware.

Patch whitespace checks passed. Backend performance validation is pending.

* hexagon: fuse post-norm residual add into RMS_NORM_MUL

* hex-fusion: refactor RMS_NORM fusion and add dedicated RMS_NORM_MUL_ADD opcode

Improves performance by keeping things in HVX registers.
Also simplifies overall fusion logic and logging.

---------

Co-authored-by: Max Krasnyansky <maxk@qti.qualcomm.com>
(cherry picked from commit ca89968)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants