@@ -1463,18 +1463,6 @@ static void k_sum_rows_f32(const float * x, float * dst, const int ncols,
1463
1463
}
1464
1464
}
1465
1465
1466
- static void scale_f32 (const float * x, float * dst, const float scale, const int k,
1467
- const sycl::nd_item<3 > &item_ct1) {
1468
- const int i = item_ct1.get_local_range (2 ) * item_ct1.get_group (2 ) +
1469
- item_ct1.get_local_id (2 );
1470
-
1471
- if (i >= k) {
1472
- return ;
1473
- }
1474
-
1475
- dst[i] = scale * x[i];
1476
- }
1477
-
1478
1466
static void clamp_f32 (const float * x, float * dst, const float min, const float max, const int k,
1479
1467
const sycl::nd_item<3 > &item_ct1) {
1480
1468
const int i = item_ct1.get_local_range (2 ) * item_ct1.get_group (2 ) +
@@ -1612,18 +1600,6 @@ static void ggml_mul_mat_vec_nc_f16_f32_sycl(
1612
1600
}
1613
1601
}
1614
1602
1615
- static void scale_f32_sycl (const float *x, float *dst, const float scale,
1616
- const int k, queue_ptr stream) {
1617
- const int num_blocks = (k + SYCL_SCALE_BLOCK_SIZE - 1 ) / SYCL_SCALE_BLOCK_SIZE;
1618
- stream->parallel_for (
1619
- sycl::nd_range<3 >(sycl::range<3 >(1 , 1 , num_blocks) *
1620
- sycl::range<3 >(1 , 1 , SYCL_SCALE_BLOCK_SIZE),
1621
- sycl::range<3 >(1 , 1 , SYCL_SCALE_BLOCK_SIZE)),
1622
- [=](sycl::nd_item<3 > item_ct1) {
1623
- scale_f32 (x, dst, scale, k, item_ct1);
1624
- });
1625
- }
1626
-
1627
1603
static void clamp_f32_sycl (const float *x, float *dst, const float min,
1628
1604
const float max, const int k,
1629
1605
queue_ptr stream) {
@@ -1929,27 +1905,6 @@ inline void ggml_sycl_op_sum_rows(ggml_backend_sycl_context & ctx, ggml_tensor *
1929
1905
sum_rows_f32_sycl (src0_dd, dst_dd, ncols, nrows, main_stream);
1930
1906
}
1931
1907
1932
- inline void ggml_sycl_op_scale (ggml_backend_sycl_context & ctx, ggml_tensor * dst) {
1933
-
1934
- GGML_ASSERT (dst->src [0 ]->type == GGML_TYPE_F32);
1935
- GGML_ASSERT (dst->type == GGML_TYPE_F32);
1936
- GGML_ASSERT (!ggml_backend_buffer_is_sycl_split (dst->buffer ));
1937
-
1938
- float scale;
1939
- memcpy (&scale, dst->op_params , sizeof (float ));
1940
- const float * src0_dd = static_cast <const float *>(dst->src [0 ]->data );
1941
- float * dst_dd = static_cast <float *>(dst->data );
1942
-
1943
- dpct::queue_ptr main_stream = ctx.stream ();
1944
-
1945
- scale_f32_sycl (src0_dd, dst_dd, scale, ggml_nelements (dst->src [0 ]), main_stream);
1946
- /*
1947
- DPCT1010:87: SYCL uses exceptions to report errors and does not use the
1948
- error codes. The call was replaced with 0. You need to rewrite this code.
1949
- */
1950
- SYCL_CHECK (0 );
1951
- }
1952
-
1953
1908
inline void ggml_sycl_op_clamp (ggml_backend_sycl_context & ctx, ggml_tensor *dst) {
1954
1909
1955
1910
GGML_ASSERT (dst->src [0 ]->type == GGML_TYPE_F32);
@@ -2893,10 +2848,6 @@ catch (sycl::exception const &exc) {
2893
2848
std::exit (1 );
2894
2849
}
2895
2850
2896
- static void ggml_sycl_scale (ggml_backend_sycl_context & ctx, ggml_tensor * dst) {
2897
- ggml_sycl_op_scale (ctx, dst);
2898
- }
2899
-
2900
2851
static void ggml_sycl_clamp (ggml_backend_sycl_context & ctx, ggml_tensor * dst) {
2901
2852
ggml_sycl_op_clamp (ctx, dst);
2902
2853
}
0 commit comments