From b2aacdafd86312b5fd03d3ba0d8784186d0ba810 Mon Sep 17 00:00:00 2001 From: Li He Date: Thu, 22 Jan 2026 22:30:52 -0800 Subject: [PATCH] opencl: refine condition for q6_K mm --- ggml/src/ggml-opencl/ggml-opencl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp index af20604d29..84f66d121f 100644 --- a/ggml/src/ggml-opencl/ggml-opencl.cpp +++ b/ggml/src/ggml-opencl/ggml-opencl.cpp @@ -8946,9 +8946,13 @@ static void ggml_cl_mul_mat(ggml_backend_t backend, const ggml_tensor * src0, co return; } case GGML_TYPE_Q6_K: { - //if (ne11 < 32) { - // break; - //} + if (ne11 < 32) { + break; + } + if (!ggml_is_contiguous(src0) || !ggml_is_contiguous(src1)) { + break; + } + kernel = backend_ctx->kernel_mul_mm_q6_k_f32_l4_lm; nth0 = 128; // calculated as (BM*BN)/(TM*TN)