From: Alberto Cabrera Pérez Date: Wed, 26 Nov 2025 21:14:54 +0000 (+0000) Subject: Fix chunks being too small with small matrix sizes (llama/17526) X-Git-Tag: upstream/1.8.3~236 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=3de43724658cb18f66cca648e966b3a90d2e9646;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp Fix chunks being too small with small matrix sizes (llama/17526) --- diff --git a/ggml/src/ggml-cpu/repack.cpp b/ggml/src/ggml-cpu/repack.cpp index d1321191..875faedf 100644 --- a/ggml/src/ggml-cpu/repack.cpp +++ b/ggml/src/ggml-cpu/repack.cpp @@ -1731,12 +1731,13 @@ template = min_chunk_size)) { nchunk0 = nth; + dr0 = (nr0 + nchunk0 - 1) / nchunk0; } - const int64_t dr0 = (nr0 + nchunk0 - 1) / nchunk0; - // Ensure nchunk doesn't exceed the number of rows divided by minimum chunk size // This prevents creating too many tiny chunks that could overlap after alignment const int64_t max_nchunk = (nr0 + min_chunk_size - 1) / min_chunk_size;