mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #130] Tune gfx1151 INT8 deep-K tile selection #164
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#164
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/130
Author: @Yasei-no-otoko
Created: 8/22/2026
Status: 🔄 Open
Base:
main← Head:codex/optimize-int8-convrot-gfx1151📝 Commits (1)
0a2b1f4Tune gfx1151 INT8 deep-K tile selection📊 Changes
3 files changed (+107 additions, -14 deletions)
View changed files
📝
comfy_kitchen/backends/hip/gemm_wmma.h(+44 -14)📝
comfy_kitchen/backends/hip/ops/gemm_int8.hip(+17 -0)📝
tests/test_hip_wmma.py(+46 -0)📄 Description
Summary
main, including #122's shared occupancy-aware WMMA selector.256x128x128INT8 specialization only for the measuredgfx1151target whenM >= 512,N >= 128,K >= 14336, the grid covers the device, and eitherK >= 2Nor the grid divides evenly across WGPs.Why this predicate
The original
K >= 2Npredicate was re-tested. It preserves the H3 contraction but is too broad without a depth floor: representative smaller-K shapes regressed by 0.5% to 20.8% on gfx1151. A plainK >= 14336gate also selected the 256-row tile on some wide-N grids where the shared selector was faster.K = 14336is the MiniMax-H3mlp_downcontraction depth.The final predicate retains the H3/deep-K case and adds the 256-row tile only for complete WGP rounds. Compared with the previous
K >= 14336gate (HIP events, alternating fresh processes, median of run medians):(M,N,K)(512,8192,14336)(512,9216,14336)(1024,8192,14336)(3802,5376,14336)The current allocation-derived shared probe recheck measured H3
mlp_downat 15.1154 ms on gfx1151, within the prior run spread. Tested HIP outputs are bit-identical between selectors.E2E on gfx1151
MiniMax-H3, same models/prompt/seed/settings, 124 frames at 24 fps, 20 steps:
main2119 s; #130 2093 s (-1.23%).K >= 14336gateK >= 2NcandidateK >= 2NgateThe spread is below 0.8% and within fresh-process noise; the H3 shape selects the same tile in all three. Every file decodes to exactly 124 frames at 416x224/24 fps plus 5.167 s stereo AAC, with identical decoded video and audio SHA-256 hashes. The final review change only narrows other architectures and centralizes the device probe; it does not change gfx1151 tile selection or kernel math.
Architecture policy
gfx110x): #122 selector retained; compile validated, not performance-measured locally.gfx1151;gfx1150,gfx1152, andgfx1153retain #122.gfx12xx): #122 selector retained; compile and contributor runtime validated for gfx1200.Validation
test_hip_wmma.py,test_int8.py, andtest_int8_input_act.pyon gfx1151: 474 passed, 62 skippedruff checkandgit diff --checkmlp_downHIP-event sanity check on final head: 15.1154 ms🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.