Fix return type bug

This commit is contained in:
Ed Addario 2025-08-16 11:00:43 +01:00
parent 030ec53d7a
commit d4b0d89115
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 2 additions and 2 deletions

View File

@ -164,11 +164,11 @@ static std::vector<float> compute_tensor_averages(const Stats & tstats) {
static bool compute_vector_statistics(std::vector<tensor_statistics> & tstats, const std::string & name, const Stats & e) { static bool compute_vector_statistics(std::vector<tensor_statistics> & tstats, const std::string & name, const Stats & e) {
if (e.values.size() % e.counts.size() != 0) { if (e.values.size() % e.counts.size() != 0) {
LOG_ERR("%s: activation size mismatch for tensor %s (%zu vs %zu)\n", __func__, name.c_str(), e.counts.size(), e.values.size()); LOG_ERR("%s: activation size mismatch for tensor %s (%zu vs %zu)\n", __func__, name.c_str(), e.counts.size(), e.values.size());
return -1;; return false;
} }
if (e.counts.empty()) { if (e.counts.empty()) {
LOG_ERR("%s: there are no activations for tensor %s. The imatrix may be suboptimal\n", __func__, name.c_str()); LOG_ERR("%s: there are no activations for tensor %s. The imatrix may be suboptimal\n", __func__, name.c_str());
return -1; return false;
} }
const int n_mat = e.counts.size(); const int n_mat = e.counts.size();