Skip to content

Commit 414e60e

Browse files
committed
argmax: move missing function to file and fix function name
1 parent 10ab9fa commit 414e60e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

ggml/src/ggml-sycl/argmax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static void argmax_f32_i32_sycl(const float * x, int * dst, const int ncols, con
4747
});
4848
}
4949

50-
void ggml_sycl_op_argmax(ggml_backend_sycl_context & ctx, ggml_tensor * dst) try {
50+
static void ggml_sycl_op_argmax(ggml_backend_sycl_context & ctx, ggml_tensor * dst) try {
5151
GGML_ASSERT(ggml_is_contiguous(dst->src[0]));
5252

5353
GGML_ASSERT(dst->src[0]->type == GGML_TYPE_F32);

ggml/src/ggml-sycl/argmax.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
#include "common.hpp"
55

6-
void ggml_sycl_op_argmax(ggml_backend_sycl_context & ctx, ggml_tensor * dst);
6+
void ggml_sycl_argmax(ggml_backend_sycl_context & ctx, ggml_tensor * dst);
77

88
#endif // GGML_SYCL_ARGMAX_HPP

ggml/src/ggml-sycl/argsort.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#include "argsort.hpp"
22

3+
static int next_power_of_2(int x) {
4+
int n = 1;
5+
while (n < x) {
6+
n *= 2;
7+
}
8+
return n;
9+
}
10+
311
template <typename T>
412
static inline void ggml_sycl_swap(T & a, T & b) {
513
T tmp = a;

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,14 +2232,6 @@ static void sum_rows_f32_sycl(const float *x, float *dst, const int ncols,
22322232
});
22332233
}
22342234

2235-
static int next_power_of_2(int x) {
2236-
int n = 1;
2237-
while (n < x) {
2238-
n *= 2;
2239-
}
2240-
return n;
2241-
}
2242-
22432235
static void diag_mask_inf_f32_sycl(const float *x, float *dst,
22442236
const int ncols_x, const int nrows_x,
22452237
const int rows_per_channel, const int n_past,

0 commit comments

Comments
 (0)