|
3 | 3 | #include "examples/mulmat-tune/mulmat-tune.h" |
4 | 4 | #include "ggml.h" |
5 | 5 |
|
6 | | -#define UNUSED(x) (void)(x) |
7 | | - |
8 | 6 | // TODO: this should be setup by llama instead. |
9 | 7 | int ggml_mulmat_tune_setup_model(struct ggml_mulmat_tune *tune, |
10 | 8 | const char *model_name, int m_num) { |
@@ -448,9 +446,10 @@ enum ggml_backend ggml_auto_detect_backend(void) { |
448 | 446 | return GGML_BACKEND_CBLAS; |
449 | 447 | } |
450 | 448 |
|
451 | | -int ggml_get_builtin_blas_backends(int backends[]) { |
| 449 | +int ggml_get_builtin_blas_backends(int *backends) { |
452 | 450 | 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; |
454 | 453 | return 0; |
455 | 454 | } |
456 | 455 |
|
@@ -577,10 +576,12 @@ int ggml_mulmat_get_task_profiles(struct ggml_task_profile **profiles, |
577 | 576 | if (src0_type == GGML_TYPE_F32) { |
578 | 577 | *profiles = ggml_mulmat_task_profiles_f32; |
579 | 578 | return ggml_mulmat_task_profiles_f32_n; |
580 | | - } else if (src0_type == GGML_TYPE_F16) { |
| 579 | + } |
| 580 | + if (src0_type == GGML_TYPE_F16) { |
581 | 581 | *profiles = ggml_mulmat_task_profiles_f16; |
582 | 582 | return ggml_mulmat_task_profiles_f32_n; |
583 | | - } else if (ggml_is_quantized(src0_type)) { |
| 583 | + } |
| 584 | + if (ggml_is_quantized(src0_type)) { |
584 | 585 | *profiles = ggml_mulmat_task_profiles_qxx; |
585 | 586 | return ggml_mulmat_task_profiles_qxx_n; |
586 | 587 | } |
|
0 commit comments