GeezerVison is showing github.com — perf(cuda): fuse RMSNorm and RoPE in Sol-H3-VAE by losewayy · Pull Request #2323 · leejet/stable-diffusion.cpp
Conversation
losewayy
commented
Nov 10, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Sol now passes the Q/K views of the QKV projection directly to RMSNorm instead of copying them first, and the CUDA backend fuses the non-affine RMSNorm with the following partial RoPE. The kernel preserves the reduction order and rounding of the separate ops.
Related Issue / Discussion
Follow-up to #2317.
Additional Information
Tested on an RTX 5070 Ti Laptop GPU (sm_120) with CUDA 13.4. Decoding an 864×480, 56-frame clip took 13% less time on average than master. CUDA output is byte-for-byte identical to master with fusion on or off, and CPU and Vulkan outputs also match master.
Checklist
Summary by CodeRabbit
- Performance
- Improved CUDA processing for certain RMS normalization and RoPE operations, including a direct non-affine path for supported 64-channel F32 inputs.
- Updated SOL attention processing to use its dedicated projection path.
- Documentation
- Clarified the supported configurations for CUDA RMSNorm/RoPE fusion, including input format, RoPE mode, and weight layout requirements.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Walkthrough
-
The CUDA backend adds a non-affine RMSNorm-to-RoPE fusion for eligible F32 inputs with 64 channels. The SOL attention path now uses a QKV projection method that applies RMS normalization and RoPE to Q and K.
Changes: CUDA RoPE fusion and SOL projection
| Layer / File(s) |
Summary |
Non-affine CUDA RMSNorm–RoPE fusion src/core/cuda/rope.cu, docs/ggml_extensions.md |
The CUDA kernel and graph handling support an eligible two-node non-affine RMSNorm-to-RoPE fusion. The documentation describes its input requirements and distinguishes it from affine fusion. |
SOL attention projection src/model/vae/minimax_h3_vae.hpp |
DecoderAttention adds project_sol to apply RMS normalization and RoPE to Q and K. The SOL callback uses it; the non-SOL path still uses project. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Possibly related issues
leejet/stable-diffusion.cpp#2264 — The issue requests Sol-H3-VAE support; this change adds a SOL-specific attention projection path.
Possibly related PRs
Suggested reviewers: leejet
Merge Risk: Minimal · up to e8671
-
No actionable merge-blocking issue was established; the change is ready for normal merge checks.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly identifies the CUDA RMSNorm-and-RoPE fusion and its performance focus for Sol-H3-VAE. |
| Description check |
 |
The description includes all required template sections, explains the change, links related work, reports testing and performance results, and completes the checklist. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|