Skip to content

Commit 1e333d5

Browse files
authored
SYCL: Disable reorder optimize by default and stop setting tensor extras when optimize is disabled (#13254)
* SYCL: Do not set tensor extras when reorder optimize is disabled * SYCL: Disable reorder optimize by default
1 parent 2f54e34 commit 1e333d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-sycl/ggml-sycl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void ggml_check_sycl() try {
193193

194194
if (!initialized) {
195195
g_ggml_sycl_debug = get_sycl_env("GGML_SYCL_DEBUG", 0);
196-
g_ggml_sycl_disable_optimize= get_sycl_env("GGML_SYCL_DISABLE_OPT", 0);
196+
g_ggml_sycl_disable_optimize= get_sycl_env("GGML_SYCL_DISABLE_OPT", 1);
197197
g_ggml_sycl_disable_graph = get_sycl_env("GGML_SYCL_DISABLE_GRAPH", 1);
198198
GGML_SYCL_DEBUG("[SYCL] call ggml_check_sycl\n");
199199
GGML_LOG_INFO("Running with Environment Variables:\n");
@@ -338,7 +338,7 @@ ggml_backend_sycl_buffer_init_tensor(ggml_backend_buffer_t buffer,
338338
assert(tensor->view_src->buffer->buft == buffer->buft);
339339
return GGML_STATUS_SUCCESS;
340340
}
341-
if (tensor->type == GGML_TYPE_Q4_0) {
341+
if (tensor->type == GGML_TYPE_Q4_0 && !g_ggml_sycl_disable_optimize) {
342342
ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{};
343343
tensor->extra = extra;
344344
ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.

0 commit comments

Comments
 (0)