fix wrong code

This commit is contained in:
luoyu-intel 2024-01-24 22:00:24 +08:00
parent 5bb93d41b7
commit 0635f844c9

View file

@ -12206,10 +12206,9 @@ inline void ggml_sycl_op_mul_mat_sycl(
src0_as_f16.alloc(ne); src0_as_f16.alloc(ne);
to_fp16_sycl(src0_dd_i, src0_as_f16.get(), ne, stream); to_fp16_sycl(src0_dd_i, src0_as_f16.get(), ne, stream);
} }
const sycl::half *src1_ptr = const sycl::half *src0_ptr = src0->type == GGML_TYPE_F16
src1->type == GGML_TYPE_F16 ? (const sycl::half *)src0_dd_i
? (const sycl::half *)src1->data + src1_padded_row_size : src0_as_f16.get();
: src1_as_f16.get();
sycl_pool_alloc<sycl::half> src1_as_f16; sycl_pool_alloc<sycl::half> src1_as_f16;
if (src1->type != GGML_TYPE_F16) { if (src1->type != GGML_TYPE_F16) {
@ -12220,7 +12219,7 @@ inline void ggml_sycl_op_mul_mat_sycl(
to_fp16_sycl(src1_ddf_i, src1_as_f16.get(), ne, stream); to_fp16_sycl(src1_ddf_i, src1_as_f16.get(), ne, stream);
} }
const sycl::half *src1_ptr = src1->type == GGML_TYPE_F16 const sycl::half *src1_ptr = src1->type == GGML_TYPE_F16
? (const sycl::half *)src1_ddf_i ? (const sycl::half *)src1->data + src1_padded_row_size
: src1_as_f16.get(); : src1_as_f16.get();
sycl_pool_alloc<sycl::half> dst_f16(row_diff * src1_ncols); sycl_pool_alloc<sycl::half> dst_f16(row_diff * src1_ncols);