Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix f16_sycl cpy call from Arc #5411

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions ggml-sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12149,6 +12149,25 @@ inline void ggml_sycl_op_dequantize_mul_mat_vec(
const dpct::queue_ptr &stream) {

const int64_t ne00 = src0->ne[0];
const int64_t ne01 = src0->ne[1];
const int64_t ne02 = src0->ne[2];


const int64_t nb00 = src0->nb[0];
const int64_t nb01 = src0->nb[1];
const int64_t nb02 = src0->nb[2];
const int64_t nb03 = src0->nb[3];

const int64_t ne10 = src1->ne[0];
const int64_t ne11 = src1->ne[1];
const int64_t ne12 = src1->ne[2];


const int64_t nb10 = src1->nb[0];
const int64_t nb11 = src1->nb[1];
const int64_t nb12 = src1->nb[2];
const int64_t nb13 = src1->nb[3];

abhilash1910 marked this conversation as resolved.
Show resolved Hide resolved
const int64_t row_diff = row_high - row_low;

// on some GPUs it is faster to convert src1 to half and to use half precision intrinsics
Expand All @@ -12166,9 +12185,13 @@ inline void ggml_sycl_op_dequantize_mul_mat_vec(
src1_dfloat = (sycl::half *)src1->data + src1_padded_row_size;
} else {
src1_dfloat = src1_dfloat_a.alloc(ne00);
//ggml_cpy_f32_f16_sycl((const char *)src1_ddf_i, (char *)src1_dfloat,
// ne00, ne00, 1, sizeof(float), 0, 0, ne00, 1,
abhilash1910 marked this conversation as resolved.
Show resolved Hide resolved
// sizeof(sycl::half), 0, 0, stream);
ggml_cpy_f32_f16_sycl((const char *)src1_ddf_i, (char *)src1_dfloat,
ne00, ne00, 1, sizeof(float), 0, 0, ne00, 1,
sizeof(sycl::half), 0, 0, stream);
ne00, ne00, ne01, ne02, nb00, nb01, nb02,
nb03, ne10, ne11, ne12, nb10, nb11, nb12,
nb13, stream);
}
}
#else
Expand Down
Loading