mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #70] [MERGED] Add RMS fusion for RoPE #122
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/70
Author: @contentis
Created: 7/10/2026
Status: ✅ Merged
Merged: 7/13/2026
Merged by: @comfyanonymous
Base:
main← Head:rmsnorm_rope📝 Commits (4)
7a57d66Add RMS fusion to RoPE1a6190eAdd RMS fusion to RoPE26cfae6Merge remote-tracking branch 'origin/rmsnorm_rope' into rmsnorm_rope87a673cremove merge duplicates📊 Changes
9 files changed (+1728 additions, -1 deletions)
View changed files
📝
comfy_kitchen/__init__.py(+68 -0)📝
comfy_kitchen/backends/cuda/CMakeLists.txt(+1 -0)📝
comfy_kitchen/backends/cuda/__init__.py(+267 -0)📝
comfy_kitchen/backends/cuda/dlpack_bindings.cpp(+199 -0)📝
comfy_kitchen/backends/cuda/float_utils.cuh(+1 -0)➕
comfy_kitchen/backends/cuda/ops/rms_rope.cu(+568 -0)📝
comfy_kitchen/backends/eager/__init__.py(+82 -1)📝
comfy_kitchen/backends/eager/rope.py(+180 -0)➕
tests/test_rms_rope.py(+362 -0)📄 Description
RMSNorm + RoPE
Measured BF16 Q/K/frequencies, FP32 RMS scales,
eps=1e-6, 10 warmups, 8 samples, and 10 grouped iterations.BWis API-boundary bytes (inputs + outputs + frequencies + scales);Rated peakis that API BW divided by the GPU's nominal DRAM bandwidth; speedup isunfused / fused. The unfused baseline isF.rms_normfor Q/K followed by the matchingck.apply_rope*call.Reference peak bandwidths: RTX 5000 Ada 470 GB/s; RTX PRO 6000 Blackwell 1790 GB/s.
Some bandwidths are above the limit due to L2 cache hits that skew the exact result.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.