]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Add Q8_0 reorder optimization (~3x tg speedup on Intel Arc) (llama/21527)
authorPMZFX <redacted>
Tue, 7 Apr 2026 08:12:49 +0000 (04:12 -0400)
committerGeorgi Gerganov <redacted>
Thu, 30 Apr 2026 08:29:02 +0000 (11:29 +0300)
commit1ebf3cafa03bf94ae71795f2ceb4a3b2effc7cea
tree08af0c0c17a71d53bb5e24b523ecd1b3c9d67c43
parent9cbc4b3acb70f1eabd916b7deacf0ba511185ee8
Add Q8_0 reorder optimization (~3x tg speedup on Intel Arc) (llama/21527)

Extend the existing reorder optimization to Q8_0. The reorder
separates scale factors from weight data for coalesced memory
access -- was implemented for Q4_0/Q4_K/Q6_K but Q8_0 was missing.

On Arc Pro B70 (Xe2), Q8_0 tg goes from 4.88 to 15.24 t/s (3.1x)
on Qwen3.5-27B. BW utilization: 21% -> 66%.

The key fix beyond the kernels: Q8_0 was missing from the type
check in ggml_backend_sycl_buffer_init_tensor() that allocates
the extra struct carrying the reorder flag -- so the optimization
was silently skipped.

AI (Claude) was used to assist with root cause investigation and
writing the kernel code. All code was human-reviewed and tested
on real hardware.

Fixes: #21517
ggml/src/ggml-sycl/dequantize.hpp
ggml/src/ggml-sycl/dmmv.cpp
ggml/src/ggml-sycl/ggml-sycl.cpp
ggml/src/ggml-sycl/mmvq.cpp
ggml/src/ggml-sycl/quants.hpp
ggml/src/ggml-sycl/vecdotq.hpp