]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
HIP: Enable Matrix cores for MMQ Kernels, Enable stream-K for CDNA 3 (llama/14624)
authordeepsek <redacted>
Sat, 26 Jul 2025 22:28:14 +0000 (18:28 -0400)
committerGeorgi Gerganov <redacted>
Mon, 28 Jul 2025 05:43:21 +0000 (08:43 +0300)
commitae9a8738d0865303fff400699fef93820d24f72b
tree4ed0979f3e106831afa4695482cca1196cf91c4a
parentc1afe76eed2b17a6684fbde3bcf6eb675d0658e3
HIP: Enable Matrix cores for MMQ Kernels, Enable stream-K for CDNA 3 (llama/14624)

This commit adds support for MFMA instructions to MMQ. CDNA1/GFX908 CDNA2/GFX90a and CDNA3/GFX942 are supported by the MFMA-enabled code path added by this commit. The code path and stream-k is only enabled on CDNA3 for now as it fails to outperform blas in all cases on the other devices.
Blas is currently only consistently outperformed on CDNA3 due to issues in the amd-provided blas libraries.
This commit also improves the awareness of MMQ towards different warp sizes and as a side effect improves the performance of all quant formats besides q4_0 and q4_1, which regress slightly, on GCN gpus.
src/ggml-cuda/common.cuh
src/ggml-cuda/mma.cuh
src/ggml-cuda/mmq.cu
src/ggml-cuda/mmq.cuh
src/ggml-cuda/vendors/hip.h