From 08b500b958a3f1102e6500e5c425e65517d6fb7e Mon Sep 17 00:00:00 2001 From: Joel Farthing Date: Tue, 25 Aug 2026 09:29:06 -0500 Subject: [PATCH] ggml: fix HC_POST single-token CPU chunk count (#2357) --- ggml/src/ggml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index b9f9d16a..ef687db8 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -24471,7 +24471,8 @@ static void ggml_compute_forward_hc_post_f32( const float * post_r = (const float *)((const char *)post->data); const float * comb_r = (const float *)((const char *)comb->data); - int nchunk = (ne0 + nth - 1)/nth; + // chunks are 64 elements wide (see `first` below); threads stride over chunks + int nchunk = (ne0 + 63)/64; for (int ic = ith; ic < nchunk; ic += nth) { int first = 64*ic;