Skip to content

Commit 6de75cd

Browse files
committed
SYCL: set extras only on GGML_TYPE_Q4_0
1 parent add2a3a commit 6de75cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,11 @@ ggml_backend_sycl_buffer_init_tensor(ggml_backend_buffer_t buffer,
333333
assert(tensor->view_src->buffer->buft == buffer->buft);
334334
return GGML_STATUS_SUCCESS;
335335
}
336-
337-
ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{};
338-
tensor->extra = extra;
339-
ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.
336+
if (tensor->type == GGML_TYPE_Q4_0) {
337+
ggml_tensor_extra_gpu * extra = new ggml_tensor_extra_gpu{};
338+
tensor->extra = extra;
339+
ctx->tensor_extras.push_back(extra); //used to release it when destroy ctx.
340+
}
340341

341342
if (ggml_is_quantized(tensor->type)) {
342343
// initialize padding to 0 to avoid possible NaN values

0 commit comments

Comments
 (0)