From 4817827a60d6acf19fdf0c7b6b3802d01ce4c74e Mon Sep 17 00:00:00 2001 From: Reinforce-II Date: Mon, 22 Jan 2024 21:13:57 +0800 Subject: [PATCH] simplify code Co-authored-by: Georgi Gerganov --- ggml.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ggml.c b/ggml.c index 98d8b67c3..0f2a1b417 100644 --- a/ggml.c +++ b/ggml.c @@ -16797,9 +16797,7 @@ struct ggml_cplan ggml_graph_plan(const struct ggml_cgraph * cgraph, int n_threa if (ggml_compute_forward_mul_mat_use_blas(node)) { if (node->src[0]->type != GGML_TYPE_F32) { // here we need memory for fully dequantized matrix from src0 - cur = ggml_type_size(GGML_TYPE_F32) - * node->src[0]->ne[0]*node->src[0]->ne[1] - * node->src[1]->ne[2]*node->src[1]->ne[3]; + cur = ggml_type_size(GGML_TYPE_F32)*ggml_nelements(node->src[0]); } } else #endif