]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Fix garbled output with REPACK at high thread counts (llama/16956)
authorNoah <redacted>
Tue, 4 Nov 2025 05:04:59 +0000 (05:04 +0000)
committerGeorgi Gerganov <redacted>
Sun, 9 Nov 2025 21:38:03 +0000 (23:38 +0200)
commit52e43a2fa58dc7999aaf6be9764edf86e8b373dd
treeb1bd778a6376edfcfb38b71d1c503bf505dcf6a1
parente51a2f90fe259033e0f307d63fbee882585ca91f
Fix garbled output with REPACK at high thread counts (llama/16956)

* Fix garbled output with REPACK at high thread counts

Fixed a race condition in the REPACK matrix multiplication code that caused garbled output when using 26+ threads (model-dependent threshold). The issue occurred because with high thread counts, the code forced chunk count to equal thread count, creating many small chunks. After aligning these chunks to NB_COLS boundaries, adjacent chunks could overlap, causing data corruption and race conditions. The fix enforces minimum chunk sizes based on NB_COLS and caps maximum chunk count to prevent creating too many tiny chunks, ensuring proper alignment without overlaps.

* Update ggml/src/ggml-cpu/repack.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml-cpu/repack.cpp

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
ggml/src/ggml-cpu/repack.cpp