Skip to content

Commit 201d5ff

Browse files
committed
fix warnings
1 parent 567d991 commit 201d5ff

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

examples/mulmat-tune/bench-out/13b.q8_0.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@
8686
64 5 51 0 0 16 0
8787
128 10 185 0 0 71 0
8888
256 20 858 0 0 136 0
89-
512 39 2888 0 0 316 0
89+
512 39 2888 0 0 316 0
90+

examples/mulmat-tune/bench-out/7b.q4_0.blis.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@
8787
128 9 180 0 0 55 0
8888
256 19 830 0 0 255 0
8989
512 40 2975 0 0 826 0
90-
s
90+

examples/mulmat-tune/bench-out/7b.q5_0.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@
8686
64 5 51 0 0 20 0
8787
128 10 202 0 0 72 0
8888
256 19 706 0 0 136 0
89-
512 40 3305 0 0 319 0
89+
512 40 3305 0 0 319 0
90+

examples/mulmat-tune/mulmat-tune.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#include "examples/mulmat-tune/mulmat-tune.h"
44
#include "ggml.h"
55

6-
#define UNUSED(x) (void)(x)
7-
86
// TODO: this should be setup by llama instead.
97
int ggml_mulmat_tune_setup_model(struct ggml_mulmat_tune *tune,
108
const char *model_name, int m_num) {
@@ -448,9 +446,10 @@ enum ggml_backend ggml_auto_detect_backend(void) {
448446
return GGML_BACKEND_CBLAS;
449447
}
450448

451-
int ggml_get_builtin_blas_backends(int backends[]) {
449+
int ggml_get_builtin_blas_backends(int *backends) {
452450
if (!ggml_cpu_has_blas()) {
453-
UNUSED(backends);
451+
// avoid warning: pointer parameter 'backends' can be pointer to const [readability-non-const-parameter]
452+
backends[0] = GGML_BACKEND_UNKNOWN;
454453
return 0;
455454
}
456455

@@ -577,10 +576,12 @@ int ggml_mulmat_get_task_profiles(struct ggml_task_profile **profiles,
577576
if (src0_type == GGML_TYPE_F32) {
578577
*profiles = ggml_mulmat_task_profiles_f32;
579578
return ggml_mulmat_task_profiles_f32_n;
580-
} else if (src0_type == GGML_TYPE_F16) {
579+
}
580+
if (src0_type == GGML_TYPE_F16) {
581581
*profiles = ggml_mulmat_task_profiles_f16;
582582
return ggml_mulmat_task_profiles_f32_n;
583-
} else if (ggml_is_quantized(src0_type)) {
583+
}
584+
if (ggml_is_quantized(src0_type)) {
584585
*profiles = ggml_mulmat_task_profiles_qxx;
585586
return ggml_mulmat_task_profiles_qxx_n;
586587
}

examples/mulmat-tune/mulmat-tune.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int ggml_mulmat_get_task_profiles(struct ggml_task_profile **profiles,
105105

106106
const char *ggml_get_backend_name(/*enum ggml_backend*/ int backend);
107107

108-
int ggml_get_builtin_blas_backends(int backends[]);
108+
int ggml_get_builtin_blas_backends(int *backends);
109109

110110
const char *ggml_get_blas_vendor(void);
111111

examples/mulmat-tune/prompt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function prompt {
8080
printf "=== model: %s, threads: %s, questions: %2d ===\n" $model_name $T $q
8181

8282
args="-t $T -m $model_path \
83-
-c 512 -b 1024 --keep 256 --repeat_penalty 1.0 \
84-
--mlock --no-mmap \
85-
-n 8 -e -p $p"
83+
-c 512 -b 1024 --keep 256 --repeat_penalty 1.0 \
84+
--mlock --no-mmap \
85+
-n 8 -e -p $p"
8686

8787
#echo "prompt" $p
8888

0 commit comments

Comments
 (0)