Akarshan Biswas commited on
Commit
53abb97
·
1 Parent(s): 23e676b

SYCL: Disable reorder optimize by default and stop setting tensor extras when optimize is disabled (llama/13254)

Browse files

* SYCL: Do not set tensor extras when reorder optimize is disabled

* SYCL: Disable reorder optimize by default

Files changed (1) hide show
  1. ggml/src/ggml-sycl/ggml-sycl.cpp +2 -2
ggml/src/ggml-sycl/ggml-sycl.cpp CHANGED
@@ -193,7 +193,7 @@ static void ggml_check_sycl() try {
193
 
194
  if (!initialized) {
195
  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);
197
  g_ggml_sycl_disable_graph = get_sycl_env("GGML_SYCL_DISABLE_GRAPH", 1);
198
  GGML_SYCL_DEBUG("[SYCL] call ggml_check_sycl\n");
199
  GGML_LOG_INFO("Running with Environment Variables:\n");
@@ -338,7 +338,7 @@ ggml_backend_sycl_buffer_init_tensor(ggml_backend_buffer_t buffer,
338
  assert(tensor->view_src->buffer->buft == buffer->buft);
339
  return GGML_STATUS_SUCCESS;
340
  }
341
- if (tensor->type == GGML_TYPE_Q4_0) {
342
  ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{};
343
  tensor->extra = extra;
344
  ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.
 
193
 
194
  if (!initialized) {
195
  g_ggml_sycl_debug = get_sycl_env("GGML_SYCL_DEBUG", 0);
196
+ g_ggml_sycl_disable_optimize= get_sycl_env("GGML_SYCL_DISABLE_OPT", 1);
197
  g_ggml_sycl_disable_graph = get_sycl_env("GGML_SYCL_DISABLE_GRAPH", 1);
198
  GGML_SYCL_DEBUG("[SYCL] call ggml_check_sycl\n");
199
  GGML_LOG_INFO("Running with Environment Variables:\n");
 
338
  assert(tensor->view_src->buffer->buft == buffer->buft);
339
  return GGML_STATUS_SUCCESS;
340
  }
341
+ if (tensor->type == GGML_TYPE_Q4_0 && !g_ggml_sycl_disable_optimize) {
342
  ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{};
343
  tensor->extra = extra;
344
  ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.