20
20
#pragma warning(disable: 4244 4267) // possible loss of data
21
21
#endif
22
22
23
- void ggml_graph_compute_helper (std::vector<uint8_t > & buf, ggml_cgraph * graph, int n_threads) {
23
+ static void ggml_graph_compute_helper (std::vector<uint8_t > & buf, ggml_cgraph * graph, int n_threads) {
24
24
struct ggml_cplan plan = ggml_graph_plan (graph, n_threads);
25
25
26
26
if (plan.work_size > 0 ) {
@@ -31,7 +31,7 @@ void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph,
31
31
ggml_graph_compute (graph, &plan);
32
32
}
33
33
34
- float tensor_sum_elements (const ggml_tensor * tensor) {
34
+ static float tensor_sum_elements (const ggml_tensor * tensor) {
35
35
float sum = 0 ;
36
36
if (tensor->type ==GGML_TYPE_F32) {
37
37
for (int j = 0 ; j < tensor->ne [1 ]; j++) {
@@ -43,7 +43,7 @@ float tensor_sum_elements(const ggml_tensor * tensor) {
43
43
return sum;
44
44
}
45
45
46
- void tensor_dump (const ggml_tensor * tensor, const char * name) {
46
+ static void tensor_dump (const ggml_tensor * tensor, const char * name) {
47
47
printf (" %15s: type = %i (%5s) ne = %5" PRIi64 " x %5" PRIi64 " x %5" PRIi64 " , nb = (%5zi, %5zi, %5zi) - " , name,
48
48
tensor->type , ggml_type_name (tensor->type ),
49
49
tensor->ne [0 ], tensor->ne [1 ], tensor->ne [2 ], tensor->nb [0 ], tensor->nb [1 ], tensor->nb [2 ]);
@@ -58,7 +58,7 @@ struct benchmark_params_struct {
58
58
int32_t n_iterations = 10 ;
59
59
};
60
60
61
- void print_usage (int /* argc*/ , char ** argv, struct benchmark_params_struct params) {
61
+ static void print_usage (int /* argc*/ , char ** argv, struct benchmark_params_struct params) {
62
62
fprintf (stderr, " usage: %s [options]\n " , argv[0 ]);
63
63
fprintf (stderr, " \n " );
64
64
fprintf (stderr, " options:\n " );
0 commit comments