mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #216] [MERGED] Fused ConvRot requant kernel for w4a8/w6a8 #229
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#229
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/216
Author: @kijai
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @comfyanonymous
Base:
main← Head:w6a8-fused-requant📝 Commits (4)
da7bbf0Fused CUDA requant for W6A8b79adb6Fused ConvRot requant kernel for w4a8/w6a88faa81aFix test6ab248dRotate in registers instead of shared memory in the fused requant kernel📊 Changes
5 files changed (+510 additions, -201 deletions)
View changed files
📝
comfy_kitchen/backends/cuda/__init__.py(+41 -63)📝
comfy_kitchen/backends/cuda/dlpack_bindings.cpp(+36 -32)📝
comfy_kitchen/backends/cuda/ops/w4a8_gemm.cu(+332 -106)➕
tests/test_w4a8_requant.py(+48 -0)📝
tests/test_w6a8.py(+53 -0)📄 Description
One fused CUDA kernel for w4a8/w6a8 requantization: ConvRot rotation in shared memory, then codebook (4-bit) or uniform (6-bit) quantization, replacing the two-pass rotate → copy → quantize path.
No rotated copy in memory, one launch per weight; H3 fc1 requant 1.6 → 0.8 ms (4-bit) and 29 → 0.6 ms (6-bit)
Results match the eager quantizer up to fp32 rounding order.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.