Skip to content

Commit 1384273

Browse files
committed
Fix L2 norm from rebase
1 parent 13f628d commit 1384273

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ggml/src/ggml-sycl/norm.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,13 @@ void ggml_sycl_op_l2_norm(ggml_backend_sycl_context& ctx, ggml_tensor* dst) {
473473
GGML_ASSERT(dst->src[0]->type == GGML_TYPE_F32);
474474
GGML_ASSERT(dst->type == GGML_TYPE_F32);
475475

476+
dpct::queue_ptr main_stream = ctx.stream();
477+
SYCL_CHECK(ggml_sycl_set_device(ctx.device));
478+
476479
const int64_t ne00 = dst->src[0]->ne[0];
477480
const int64_t nrows = ggml_nrows(dst->src[0]);
481+
const float * src0_dd = static_cast<const float *>(dst->src[0]->data);
482+
float * dst_dd = static_cast<float *>(dst->data);
478483

479484
float eps;
480485
memcpy(&eps, dst->op_params, sizeof(float));

0 commit comments

Comments
 (0)