From 7704db252108d3ec69be4fdcaee4d834ea5e8fa8 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 4 Sep 2023 20:48:25 +0300 Subject: [PATCH] ggml : just in case --- ggml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.c b/ggml.c index 38b1155c1..fe06c4067 100644 --- a/ggml.c +++ b/ggml.c @@ -4285,7 +4285,7 @@ int64_t ggml_nrows(const struct ggml_tensor * tensor) { } size_t ggml_nbytes(const struct ggml_tensor * tensor) { - size_t nbytes = tensor->ne[0]*tensor->nb[0]/ggml_blck_size(tensor->type); + size_t nbytes = (tensor->ne[0]*tensor->nb[0])/ggml_blck_size(tensor->type); for (int i = 1; i < GGML_MAX_DIMS; ++i) { nbytes += (tensor->ne[i] - 1)*tensor->nb[i]; }