From 1a24df163920a4744a95373d178d790b72a9bb2f Mon Sep 17 00:00:00 2001 From: thelittlefireman <5165783+thelittlefireman@users.noreply.github.com> Date: Fri, 23 Oct 2026 21:37:20 +0200 Subject: [PATCH] ggm-cuda: Enforce DP4A MMQ tile height multiple of warp size (#30837) Added static assertion to enforce DP4A MMQ tile height requirement. --- ggml/src/ggml-cuda/mmq.cuh | 1 + 1 file changed, 1 insertion(+) diff --git a/ggml/src/ggml-cuda/mmq.cuh b/ggml/src/ggml-cuda/mmq.cuh index e008a34c0..1375ba3e8 100644 --- a/ggml/src/ggml-cuda/mmq.cuh +++ b/ggml/src/ggml-cuda/mmq.cuh @@ -435,6 +435,7 @@ template static __de constexpr int warp_size = ggml_cuda_get_physical_warp_size(); constexpr int nwarps = ggml_cuda_mmq_get_nthreads(type, J, fallback, prec_src1) / warp_size; constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback, prec_src1); + static_assert(I % warp_size == 0, "DP4A MMQ tile height must be a multiple of the physical warp size"); const bool y_scale_used = y_scale != nullptr;