Unconditionally increment ncall

Co-authored-by: slaren <slarengh@gmail.com>
This commit is contained in:
jukofyork 2024-05-06 14:43:14 +01:00 committed by GitHub
parent 5e98f44e2f
commit c6d2bbbb17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,10 +121,7 @@ bool IMatrixCollector::collect_imatrix(struct ggml_tensor * t, bool ask, void *
auto & e = m_stats[wname];
// We select top-k experts, the number of calls for the expert tensors will be k times larger.
// NOTE: This will trigger the "if (e.ncall > m_last_call)" save conditional on the first active expert.
// The commented out "if (idx == t->src[0]->ne[0] - 1) ++e.ncall;" doesn't work.
if (((int32_t *) t->op_params)[0] == 0) ++e.ncall;
++e.ncall;
if (e.values.empty()) {
e.values.resize(src1->ne[0]*n_as, 0);