]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
[SYCL] Add Q8_0 reorder optimization (~3x tg speedup on Intel Arc) (#21527)
authorPMZFX <redacted>
Tue, 7 Apr 2026 08:12:49 +0000 (04:12 -0400)
committerGitHub <redacted>
Tue, 7 Apr 2026 08:12:49 +0000 (16:12 +0800)
commit0988accf824e817d0e3db55c05f5f2954fbfe505
tree30abea1599742fbb8e5c7da64d56b21f7877ef02
parent0033f53a072af953b457c9fd2314e6e28bd11cc7
[SYCL] Add Q8_0 reorder optimization (~3x tg speedup on Intel Arc) (#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