From c6e616baaec70ebfcfef9bac010b553b34ceb3d4 Mon Sep 17 00:00:00 2001 From: Ouadie EL FAROUKI Date: Wed, 4 Sep 2024 16:26:33 +0100 Subject: [PATCH] [SYCL] Fix DMMV dequantization (#9279) Fixed dmmv dequant for ncols== GGML_SYCL_DMMV_X --- ggml/src/ggml-sycl/dmmv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml-sycl/dmmv.cpp b/ggml/src/ggml-sycl/dmmv.cpp index 179a1b03f973c..8741625ebaafd 100644 --- a/ggml/src/ggml-sycl/dmmv.cpp +++ b/ggml/src/ggml-sycl/dmmv.cpp @@ -78,8 +78,8 @@ static void dequantize_mul_mat_vec(const void * __restrict__ vx, const dfloat * } // sum up partial sums and write back result -#pragma unroll - for (int mask = warp_size / 2; mask > 0; mask >>= 1) { + const int mask_start = ncols > GGML_SYCL_DMMV_X ? WARP_SIZE >> 1 : WARP_SIZE >> 2; + for (int mask = mask_start; mask > 0; mask >>= 1) { tmp += dpct::permute_sub_group_by_xor(item_ct1.get_sub_group(), tmp, mask); }