From 6a08f25c40d2139abc192113fbfc0f3a6931f281 Mon Sep 17 00:00:00 2001 From: Ruben Ortlam Date: Mon, 24 Aug 2026 17:23:15 +0200 Subject: [PATCH] remove elem row/col fast path, invalid for RDNA4 --- .../vulkan-shaders/mul_mmq_cm1.comp | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp index 94b6325cc6..7e79b0d80f 100644 --- a/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp +++ b/ggml/src/ggml-vulkan/vulkan-shaders/mul_mmq_cm1.comp @@ -168,24 +168,17 @@ void main() { uint elem_row[CM_ELEMS]; uint elem_col[CM_ELEMS]; - if (WARP == 32) { - [[unroll]] for (uint e = 0; e < CM_ELEMS; ++e) { - elem_row[e] = gl_SubgroupInvocationID / TN + 2 * e; - elem_col[e] = gl_SubgroupInvocationID % TN; - } - } else { - for (uint i = gl_LocalInvocationID.x; i < TM * TN; i += BLOCK_SIZE) { - cm_layout_probe[i] = int32_t(i); - } - barrier(); + for (uint i = gl_LocalInvocationID.x; i < TM * TN; i += BLOCK_SIZE) { + cm_layout_probe[i] = int32_t(i); + } + barrier(); - coopmat probe; - coopMatLoad(probe, cm_layout_probe, 0, TN, gl_CooperativeMatrixLayoutRowMajor); + coopmat probe; + coopMatLoad(probe, cm_layout_probe, 0, TN, gl_CooperativeMatrixLayoutRowMajor); - [[unroll]] for (uint e = 0; e < CM_ELEMS; ++e) { - elem_row[e] = uint(probe[e]) / TN; - elem_col[e] = uint(probe[e]) % TN; - } + [[unroll]] for (uint e = 0; e < CM_ELEMS; ++e) { + elem_row[e] = uint(probe[e]) / TN; + elem_col[e] = uint(probe[e]) % TN; } const uint loadr_a = gl_LocalInvocationID.x % (BK / LOAD_VEC_A);