diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-05-02 23:09:08 +0300 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-05-02 23:09:08 +0300 |
commit | 0e6cbff1b7509628c588e661166f6e187137734d (patch) | |
tree | 3f1431d95cf186ea1b2d7afee0722d02e6ef2658 /examples/benchmark | |
parent | 5d5817ca603d4cb451bed26594aa3dcd93f4ec56 (diff) |
llama : fix compile warnings
Diffstat (limited to 'examples/benchmark')
-rw-r--r-- | examples/benchmark/benchmark-matmult.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/benchmark/benchmark-matmult.cpp b/examples/benchmark/benchmark-matmult.cpp index 2cc1a14..6117ae3 100644 --- a/examples/benchmark/benchmark-matmult.cpp +++ b/examples/benchmark/benchmark-matmult.cpp @@ -38,9 +38,9 @@ float tensor_sum_elements(struct ggml_tensor * tensor) { #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" -#define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5ld x %5ld x %5ld, nb = (%5li, %5li, %5li) - ", #TENSOR, \ +#define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ - TENSOR->ne[0], TENSOR->ne[1], TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ + (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ { float sum = tensor_sum_elements(TENSOR); printf("Sum of tensor %s is %6.2f\n",#TENSOR, sum); } struct benchmark_params_struct { @@ -138,7 +138,7 @@ int main(int argc, char ** argv) { ctx = ggml_init(params); if (!ctx) { fprintf(stderr, "%s: ggml_init() failed\n", __func__); - return false; + return 1; } |