summaryrefslogtreecommitdiff
path: root/examples/imatrix/imatrix.cpp
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-01-18 21:45:51 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2024-01-18 21:45:51 +0200
commit2d5419d08ab1131623e6a1d554607b7663435e87 (patch)
tree324d6fd7d0ac709c0d0a9f49cacff94c6a26ab9e /examples/imatrix/imatrix.cpp
parentd391ae9b4919e24624cc963d82162450848beaf4 (diff)
imatrix : fix assert for src0 non-cont check
Diffstat (limited to 'examples/imatrix/imatrix.cpp')
-rw-r--r--examples/imatrix/imatrix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/imatrix/imatrix.cpp b/examples/imatrix/imatrix.cpp
index af78711c..5a3d30b8 100644
--- a/examples/imatrix/imatrix.cpp
+++ b/examples/imatrix/imatrix.cpp
@@ -80,7 +80,7 @@ bool IMatrixCollector::collect_imatrix(struct ggml_tensor * t, bool ask, void *
// for simplicity, always copy src0 to host, because it is small
// take into account that src0 is not contiguous!
GGML_ASSERT(src0->ne[1] == src1->ne[1]);
- GGML_ASSERT(n_as*ggml_nrows(src0));
+ GGML_ASSERT(n_as*ggml_nrows(src0)*sizeof(int) == GGML_PAD(ggml_nbytes(src0), n_as*sizeof(int)));
m_ids.resize(ggml_nbytes(src0)/sizeof(int));
ggml_backend_tensor_get(src0, m_ids.data(), 0, ggml_nbytes(src0));