llama.cpp
2e08ef06 - metal : gather the kv_rows K/V in their own type

Commit
58 minutes ago
metal : gather the kv_rows K/V in their own type The non-vec kv_rows path always gathered the referenced rows into an F16 buffer, so a BF16 cache was converted to F16 and the attention ran the f16 kernels. Replace the use_kv_f16 flag with the type of the buffer that the attention reads: quantized K/V is still dequantized to F16, but the cache type is otherwise kept, so BF16 stays BF16 through the gather and the partial-chunk pad. The gather kernel is now same-type (template on T, no cast), the gather and pad sizes/strides use ggml_type_size(kv_type), and the tensor, half8x8 and vec pipeline selectors take kv_type instead of the boolean. Add BF16 gather tests for the half8x8 path with and without the pad. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB)
Author
Parents
Loading