From 9691ea2763fac0d78336baa4bfeadbf60ad77a29 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Fri, 16 Oct 2026 03:06:25 +0200 Subject: [PATCH] sycl: the planar Q6_K head kernel gets the large-GRF launch at 2-8 columns on Arc A-series (#2340 + #2207) The planar kernel of #2340 is the wide kernel's arithmetic, but it was launched without the 256-GRF mode that #2207 gives the GGUF-layout wide kernel, so on an Alchemist card it spilled: mmvq_bench 2560 x 248320 on an A750, 4 columns, 1.78 ms (GGUF layout, large GRF) against 15.4 ms planar, 8 columns 4.8 against 48 ms. Same rule as #2207 (STRATA_MMVQ_LARGE_GRF, default on Alchemist only), same arithmetic. --- sycl/src/kernels/cuda/native_mmvq.dp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sycl/src/kernels/cuda/native_mmvq.dp.cpp b/sycl/src/kernels/cuda/native_mmvq.dp.cpp index 1ba3c817..3e223443 100644 --- a/sycl/src/kernels/cuda/native_mmvq.dp.cpp +++ b/sycl/src/kernels/cuda/native_mmvq.dp.cpp @@ -2947,6 +2947,17 @@ void q6_planar_launch(const Q6Planar& w, const Q81Block* x, float* y, dpct::queu const uint8_t *ql = w.ql, *qh = w.qh, *sc = w.sc; const sycl::half* d = w.d; const int n_in = w.n_in, n_out = w.n_out; + if constexpr (NCOLS > 1) { // same rule as the GGUF-layout wide kernel (#2207): the multi-column kernel spills at 128 GRF on Alchemist + if (mmvq_large_grf(s)) { + s->parallel_for>>( + sycl::nd_range<3>(sycl::range(1, 1, blocks) * sycl::range(1, WARPS, WARP), sycl::range(1, WARPS, WARP)), + sycl::ext::oneapi::experimental::properties{sycl::ext::intel::experimental::grf_size<256>}, + [=](sycl::nd_item<3>) [[sycl::reqd_sub_group_size(32)]] { + native_mmvq_q6k_planar_kernel(ql, qh, sc, d, x, y, n_in, n_out); + }); + return; + } + } s->parallel_for>>( sycl::nd_range<3>(sycl::range(1, 1, blocks) * sycl::range(1, WARPS, WARP), sycl::range(1, WARPS, WARP)), [=](sycl::nd_item<3>) [[sycl::reqd_sub_group_size(32)]] {