mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #69] RDNA-aware autotune configs for the INT8 matmul kernels #120
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#120
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/69
Author: @liminfei-amd
Created: 7/10/2026
Status: 🔄 Open
Base:
main← Head:rdna-int8-autotune📝 Commits (6)
e9f2c72RDNA-aware autotune configs for the INT8 matmul kernelsf004d58Add waves_per_eu variants to the RDNA INT8 autotune poolce6e98dfix(triton): scope RDNA INT8 autotuning per devicea6dcb22refactor(triton): share INT8 autotune kwargs04ac357fix(triton): improve RDNA INT8 autotune selectiona789909test(triton): cover INT8 device index forwarding📊 Changes
2 files changed (+295 additions, -21 deletions)
View changed files
📝
comfy_kitchen/backends/triton/quantization.py(+83 -21)📝
tests/test_int8.py(+212 -0)📄 Description
RDNA-aware autotune configs for the INT8 matmul kernels
What
This keeps the existing CUDA/CDNA behavior and selects a ten-candidate INT8 Triton pool for the RDNA generation serving each call.
gfx11*gets a small-M64x64x128, eight-warp tile;gfx12*retains its existing pool. ForM <= 128, only the unstable128x128x128tile is removed.device_indexremains in the autotune key so heterogeneous devices tune separately, but is marked non-specializing in both kernels so the scalar value does not create duplicate code variants.Why
The original six default configs use
num_stages=3-4. Shallownum_stages=2pools perform better on the tested consumer RDNA devices. Follow-up SDXL testing also showed that one pool should not be shared blindly across RDNA generations: the extra small-M tile helpsgfx11, while replacing agfx12tile regresses that generation.Validation
main5a997b17; cumulative diff is two files (+236/-21).tests/test_int8.pyon gfx1100, gfx1151, and gfx1201: 80 passed / 33 skipped / the same 5 CUDA-extension-only failures as the before arm.device_indexcreated one extra compiled entry before this update and zero afterward; the output remained finite.Reporter follow-up
The exact 1.70 vs 1.79 s/it E2E run could not be reproduced without the reporter's private config/model setup. On gfx1151, their six-config pool was not slower than the one-config pool in steady-state kernel time; its first-use autotune cost was much larger. However, their feedback exposed a real selection gap in this PR's prior pool, and the generation-specific update above improves the matching SDXL shapes without regressing gfx1201.
Fixes #68.
AI usage disclosure: this update was prepared with AI assistance. The submitting human remains responsible for reviewing the changes and validation before publication.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.