mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #217] Add exact BF16 register ConvRot256 fast path for SM120 #227
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#227
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/217
Author: @Tokha233
Created: 9/30/2026
Status: 🔄 Open
Base:
main← Head:cuda/convrot-register-sm120📝 Commits (1)
6e2006dAdd exact BF16 register ConvRot256 fast path for SM120📊 Changes
9 files changed (+1291 additions, -0 deletions)
View changed files
📝
NOTICE(+7 -0)➕
comfy_kitchen/backends/cuda/ops/convrot_register.cuh(+143 -0)📝
comfy_kitchen/backends/cuda/ops/int8_linear.cu(+42 -0)➕
docs/benchmarks/convrot-graph-benchmark.json(+837 -0)➕
docs/benchmarks/convrot-register-sm120.md(+47 -0)➕
docs/benchmarks/full-dit.json(+82 -0)➕
docs/benchmarks/source-sha256.json(+7 -0)➕
tests/benchmark_convrot_register.py(+52 -0)➕
tests/test_convrot_register.py(+74 -0)📄 Description
This adds an exact BF16 register implementation of ConvRot256 for SM120 at K=5376/7168. It keeps Kitchen's FP32 operation association, per-stage 0.5 scaling, BF16 quantization barriers and rounding. The existing implementation handles other widths, architectures, dtypes, stochastic rounding and fused input activations.
Eight-lane groups keep rotation values in registers and exchange the required values with warp shuffles, replacing shared-memory rotation scratch. Aligned vector loads/stores are guarded in the launcher. There is no new quantization format or approximation.
RTX 5090 D v2 measurements
Baseline
19ea55b(Kitchen 0.2.36), CUDA 13.0.88, PyTorch 2.12.0+cu130. CUDA events, warmed graph replays, eight alternating groups; all raw samples and a reproduction script are included indocs/benchmarks/convrot-register-sm120.md.Full public H3 DiT smoke test (Larry v4, 8 steps, 768×512/124 frames, fixed seed/condition): three warmed runs averaged 15.860485 → 15.815302 s; both video/audio latent SHA256 match. The 0.285% full-DiT difference is small and sequentially measured, so I am not presenting it as a robust end-to-end speedup.
Validation
git diff --checkpass.Layout provenance is attributed to SGLang PR #38040; Kitchen arithmetic is retained. Commit is DCO signed off. Prepared with AI assistance; the measurements above were run on the stated hardware. Other GPU architectures have not been benchmarked for this specialization.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.