From c6d2bbbb17dba1d4213324384e6fd910c0a6c052 Mon Sep 17 00:00:00 2001 From: jukofyork <69222624+jukofyork@users.noreply.github.com> Date: Mon, 6 May 2024 14:43:14 +0100 Subject: [PATCH] Unconditionally increment ncall Co-authored-by: slaren --- examples/imatrix/imatrix.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/imatrix/imatrix.cpp b/examples/imatrix/imatrix.cpp index 4b88d8833..ca0c0bbf6 100644 --- a/examples/imatrix/imatrix.cpp +++ b/examples/imatrix/imatrix.cpp @@ -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);