simplify code

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Reinforce-II 2024-01-22 21:13:57 +08:00 committed by GitHub
parent 130b0812d0
commit 4817827a60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

4
ggml.c
View file

@ -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 (ggml_compute_forward_mul_mat_use_blas(node)) {
if (node->src[0]->type != GGML_TYPE_F32) { if (node->src[0]->type != GGML_TYPE_F32) {
// here we need memory for fully dequantized matrix from src0 // here we need memory for fully dequantized matrix from src0
cur = ggml_type_size(GGML_TYPE_F32) cur = ggml_type_size(GGML_TYPE_F32)*ggml_nelements(node->src[0]);
* node->src[0]->ne[0]*node->src[0]->ne[1]
* node->src[1]->ne[2]*node->src[1]->ne[3];
} }
} else } else
#endif #endif