Skip to content

Commit bdca383

Browse files
authored
sycl: Hotfix for non dnnl codepath (#14677)
1 parent 55c509d commit bdca383

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2875,12 +2875,20 @@ static void ggml_sycl_mul_mat_batched_sycl(ggml_backend_sycl_context & ctx, cons
28752875
}
28762876

28772877
}
2878+
#if GGML_SYCL_DNNL
2879+
// oneDNN handles strided data and does not need overhead of get_to_fp16_nc_sycl
28782880
const int64_t ne_src1 = src1->nb[last_str] * src1->ne[last_dim] / type_size_src1;
28792881
src1_f16_alloc.alloc(ne_src1);
2880-
28812882
const to_fp16_sycl_t to_fp16_sycl = ggml_get_to_fp16_sycl(src1->type, dst);
28822883
GGML_ASSERT(to_fp16_sycl != nullptr);
28832884
to_fp16_sycl(src1_f16, src1_f16_alloc.get(), ne_src1, queue);
2885+
# else
2886+
const int64_t ne_src1 = ggml_nelements(src1);
2887+
src1_f16_alloc.alloc(ne_src1);
2888+
const to_fp16_nc_sycl_t to_fp16_nc_sycl = get_to_fp16_nc_sycl(src1->type);
2889+
GGML_ASSERT(to_fp16_nc_sycl != nullptr);
2890+
to_fp16_nc_sycl(src1_f16, src1_f16_alloc.get(), ne10, ne11, ne12, ne13, s11, s12, s13, queue);
2891+
#endif
28842892

28852893
src1_f16 = src1_f16_alloc.get();
28862894
s11 = ne10;

0 commit comments

Comments
 (0)