CUDA: fix MMQ memory fault if n_expert >> n_ubatch (llama/29941)

This commit is contained in:
Johannes Gäßler
2026-10-06 10:38:19 +03:00
committed by Georgi Gerganov
parent 05d4d89a18
commit 6421d2c1f2
+1 -1
View File
@@ -255,7 +255,7 @@ void ggml_cuda_mul_mat_q(
}
const size_t nbytes_src1_q8_1 = ne12*n_expert_used*ne10_padded * y_block_size/y_values_per_block +
ggml_cuda_mmq_get_J_max(src0->type, fallback, cc, ne11) * sizeof(block_q8_1_mmq);
ggml_cuda_mmq_get_J_max(src0->type, fallback, cc, ne12) * sizeof(block_q8_1_mmq);
ggml_cuda_pool_alloc<char> src1_q8_1(ctx.pool(), nbytes_src1_q8_1);
ggml_cuda_pool_alloc<float> src1_scale(ctx.pool());
if (src0->type == GGML_TYPE_NVFP4 && use_native_fp4) {