diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index 7b48c41bd..9d1956c18 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -4329,8 +4329,6 @@ static void dequantize_block_q4_K(const void * __restrict__ vx, dst_t * __restri scales_local[tid] = x[i].scales[tid]; item_ct1.barrier(sycl::access::fence_space::local_space); - const uint8_t * q = x[i].qs + 32*il + n*ir; - uint8_t sc, m; get_scale_min_k4(is + 0, scales_local, sc, m); const float d1 = dall * sc; @@ -4338,9 +4336,11 @@ static void dequantize_block_q4_K(const void * __restrict__ vx, dst_t * __restri get_scale_min_k4(is + 1, scales_local, sc, m); const float d2 = dall * sc; const float m2 = dmin * m; + + sycl::vec q_vec = reinterpret_cast*>(x[i].qs + 32*il + n*ir)[0]; for (int l = 0; l < n; ++l) { - y[l + 0] = d1 * (q[l] & 0xF) - m1; - y[l +32] = d2 * (q[l] >> 4) - m2; + y[l + 0] = d1 * (q_vec[l] & 0xF) - m1; + y[l +32] = d2 * (q_vec[l] >> 4) - m2; } }