[rocm-libraries] ROCm/rocm-libraries#9253 (commit 8080a21)
feat(ck-tile): add AQuant and ABQuant grouped GEMM dispatcher with ctypes bridge (#9253) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation This PR extends the CK tile dispatcher with full quantization coverage for grouped GEMM operations. Building on the BQuant dispatcher introduced in #9166, this PR adds dispatcher bridges for AQuant (A-side quantization) and ABQuant (both sides quantized), completing the three-mode quantization dispatch surface for grouped GEMM on gfx950 (MI350X). ## Technical Details Stacked on #9166 (BQuant grouped GEMM dispatcher). Adds AQuant (C = dequant(A, AQ) @ B) and ABQuant (C = dequant(A, AQ) @ dequant(B, BQ)) dispatcher bridges following the same three-layer pattern (ctypes C API → Python dispatcher → codegen). Each mode adds: *_ctypes_lib.cpp — C API exposing the kernel to Python via ctypes unified_*_codegen.py — generates kernel instantiations across the full dtype/layout/quant-group matrix *_utils.py — Python dispatcher handling argument validation, dtype selection, and parallel hipcc builds via ThreadPoolExecutor Example script and CPU-only unit tests codegen_common.py is extended with shared epilogue selection helpers reused across all three quant modes. CMakeLists.txt updated with build targets for both new ctypes shared libraries. Supported dtypes: fp8/bf8 activations, fp8i4/bf8i4 packed int4, preshuffle layouts, and MX microscaling variants — targeting gfx950 (MI350X). ## Test Plan CPU-only unit tests covering: Kernel name generation across all dtype/layout/quant-group combinations Config serialization and dimension helpers Epilogue selection logic for AQuant and ABQuant variants End-to-end example scripts (14_grouped_gemm_aquant.py, 15_grouped_gemm_abquant.py) with CPU reference verification for correctness checks. ## Test Result CPU unit tests pass for both AQuant and ABQuant dispatcher utilities. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
T
Thrupti Raj Lakshmana Gowda committed
a39b67be27f8ed3d76e9b0ab161d2f2c5f439666
Parent: 0ff4239
Committed by assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com>
on 8/4/2026, 6:54:06 PM