mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
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#201
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/182
Author: @0xDELUXA
Created: 9/16/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @comfyanonymous
Base:
main← Head:amd/hip-w4a8-gemv📝 Commits (1)
406719bHIP port of #176: W4A8 decode GEMV and fused GatedDeltaNet decode📊 Changes
10 files changed (+1283 additions, -45 deletions)
View changed files
📝
comfy_kitchen/backends/hip/CMakeLists.txt(+2 -0)📝
comfy_kitchen/backends/hip/__init__.py(+146 -2)📝
comfy_kitchen/backends/hip/dlpack_bindings.cpp(+176 -0)📝
comfy_kitchen/backends/hip/mma.h(+17 -0)➕
comfy_kitchen/backends/hip/ops/gated_delta.hip(+451 -0)📝
comfy_kitchen/backends/hip/ops/w4a8_dequant.hip(+2 -41)➕
comfy_kitchen/backends/hip/ops/w4a8_gemv.hip(+169 -0)➕
comfy_kitchen/backends/hip/w4a8_codec.h(+70 -0)📝
comfy_kitchen/gated_delta.py(+35 -2)📝
tests/test_hip_wmma.py(+215 -0)📄 Description
Ports the two HIP-compatible parts of #176.
ops/w4a8_gemv.hipreplaces the chunked path's full INT4->INT8 decode with register-side decoding andv_dot4_i32_iu8, cutting memory traffic while remaining bit-identical via the sharedw4a8_codec.handEpiRowwiseepilogue.ops/gated_delta.hipadds fused GatedDeltaNet decode and depthwise conv. Its fp32[DK, DV]state does not fit in RDNA LDS, soRthreads split each value column across registers, using LDS only for the two DK reductions per step. This keeps state traffic to one read/write per kernel.Ris instantiated for 16, 32, and 64 keys/thread.On RDNA4 bf16:
DV=512spills ~300 B/lane but is still 4.7x faster; no shipping model uses this shape.The warp-shuffle INT8 rowwise convrot quantizer is intentionally not ported, the existing HIP quantizer already uses a shared 64-thread radix-4 FHT path.
All 17 manifest targets compile into one fat binary. ISA checks confirm the expected
v_dot4_i32_iu8use on gfx11/gfx12 and scalar fallback on RDNA2, with no scratch except the notedDV=512case.Validation passes on gfx1200: gated-delta tests remain 16/16, and the HIP suite increases from 1938 to 2021 passing, with the same 102 pre-existing failures.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.