From: Neo Zhang Date: Fri, 27 Feb 2026 01:26:07 +0000 (+0800) Subject: replace the magic nunber 768 by max work group size to support iGPU (llama/19920) X-Git-Tag: v0.9.8~100 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=19a1defa9f30b2d1cb948269b0d686ec0f5346dc;p=pkg%2Fggml%2Fsources%2Fggml replace the magic nunber 768 by max work group size to support iGPU (llama/19920) Co-authored-by: Neo Zhang Jianyu --- diff --git a/src/ggml-sycl/add-id.cpp b/src/ggml-sycl/add-id.cpp index 00c073cf..8929017a 100644 --- a/src/ggml-sycl/add-id.cpp +++ b/src/ggml-sycl/add-id.cpp @@ -55,7 +55,11 @@ void ggml_sycl_add_id(ggml_backend_sycl_context& ctx, ggml_tensor* dst) { const int32_t* src2_d = (const int32_t*)src2->data; float* dst_d = (float*)dst->data; - int threads = std::min((int)ne00, 768); // cols + const unsigned int max_work_group_size = ggml_sycl_info().max_work_group_sizes[ctx.device]; + assert(work_group_size % (WARP_SIZE * WARP_SIZE) == 0); + + int threads = std::min((unsigned int)ne00, max_work_group_size); // cols + ctx.stream()->parallel_for( sycl::nd_range<3>( sycl::range<3>(1, ne02, ne01) * sycl::range<3>(1, 1, threads),