From: Akarshan Biswas Date: Tue, 6 May 2025 14:57:06 +0000 (+0530) Subject: SYCL: Disable reorder optimize by default and stop setting tensor extras when optimiz... X-Git-Tag: upstream/1.7.5+170~3 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=3c67195be931443805a3ff109ddd8730f88e3f2b;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp SYCL: Disable reorder optimize by default and stop setting tensor extras when optimize is disabled (llama/13254) * SYCL: Do not set tensor extras when reorder optimize is disabled * SYCL: Disable reorder optimize by default --- diff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cpp index 72cdbbcc..ea5d10f4 100644 --- a/ggml/src/ggml-sycl/ggml-sycl.cpp +++ b/ggml/src/ggml-sycl/ggml-sycl.cpp @@ -193,7 +193,7 @@ static void ggml_check_sycl() try { if (!initialized) { g_ggml_sycl_debug = get_sycl_env("GGML_SYCL_DEBUG", 0); - g_ggml_sycl_disable_optimize= get_sycl_env("GGML_SYCL_DISABLE_OPT", 0); + g_ggml_sycl_disable_optimize= get_sycl_env("GGML_SYCL_DISABLE_OPT", 1); g_ggml_sycl_disable_graph = get_sycl_env("GGML_SYCL_DISABLE_GRAPH", 1); GGML_SYCL_DEBUG("[SYCL] call ggml_check_sycl\n"); GGML_LOG_INFO("Running with Environment Variables:\n"); @@ -338,7 +338,7 @@ ggml_backend_sycl_buffer_init_tensor(ggml_backend_buffer_t buffer, assert(tensor->view_src->buffer->buft == buffer->buft); return GGML_STATUS_SUCCESS; } - if (tensor->type == GGML_TYPE_Q4_0) { + if (tensor->type == GGML_TYPE_Q4_0 && !g_ggml_sycl_disable_optimize) { ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{}; tensor->extra = extra; ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.