From 78ddb475de96dbb20ba5f5bba597f98a30beb807 Mon Sep 17 00:00:00 2001 From: Ed Addario Date: Sat, 2 Aug 2025 16:31:21 +0100 Subject: [PATCH] Fix problem up when GGUF does not have in_sum --- tools/imatrix/imatrix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/imatrix/imatrix.cpp b/tools/imatrix/imatrix.cpp index b92b1486f7..51d5a602a8 100644 --- a/tools/imatrix/imatrix.cpp +++ b/tools/imatrix/imatrix.cpp @@ -825,8 +825,7 @@ bool IMatrixCollector::load_imatrix(const char * file_name) { for (int64_t j = 0; j < ncounts; j++) { e.counts[j] += std::lround(((const float *) counts->data)[j]); } - // ToDo: fix blow up when GGUF does not have in_sum - if (in_sum->data != nullptr) { + if (in_sum != nullptr) { for (int64_t j = 0; j < nval; j++) { e.in_sum[j] += ((const float *) in_sum->data)[j]; }