Do not resize if in_sum is null
This commit is contained in:
parent
adbff66394
commit
5e40cf4f1c
|
|
@ -938,7 +938,9 @@ bool IMatrixCollector::load_imatrix(const char * file_name) {
|
|||
int64_t nval = ggml_nelements(in_sum2);
|
||||
if (e.values.empty()) {
|
||||
e.values.resize(nval, 0.0f);
|
||||
e.in_sum.resize(nval, 0.0f);
|
||||
if (in_sum != nullptr) {
|
||||
e.in_sum.resize(nval, 0.0f);
|
||||
}
|
||||
} else if ((size_t) nval != e.values.size()) {
|
||||
LOG_ERR("%s: mismatched sums size for %s: %zu != %zu\n", __func__, name.c_str(), (size_t) nval, e.values.size());
|
||||
gguf_free(ctx_gguf);
|
||||
|
|
|
|||
Loading…
Reference in New Issue