]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
kleidiai : fix MUL_MAT support for batched (3D) inputs (llama/20620)
authorJustin Bradford <redacted>
Tue, 17 Mar 2026 12:03:54 +0000 (05:03 -0700)
committerGeorgi Gerganov <redacted>
Sun, 29 Mar 2026 12:04:36 +0000 (15:04 +0300)
commitab7d305b751ddd8c50f3beeddb95eaf02d19741a
treeb30a4d14931e771141c35012ddc32a27eda8a8d0
parent49adc8b470cb1c09d01d313b6fc1859d43658158
kleidiai : fix MUL_MAT support for batched (3D) inputs (llama/20620)

* kleidiai : fix MUL_MAT support for batched (3D) inputs

The supports_op() check incorrectly rejected MUL_MAT operations with 3D
inputs (ne[2] > 1), but the actual compute_forward_qx() implementation
handles batched inputs correctly via a loop over ne12.

This caused models with Q4_0/Q8_0 weights to crash during graph scheduling
when n_seq_max > 1, because weights were placed in KLEIDIAI buffers during
loading (tested with 2D inputs) but the runtime used 3D inputs.

Also relax the buffer check to allow supports_op() to be called during
weight loading when src[0]->buffer is NULL.

Fixes #20608

* Kleidiai support_ops should only return true for 3D inputs, not also 4D
ggml/src/ggml-cpu/kleidiai/kleidiai.cpp