Skip to content

Commit 2d5419d

Browse files
committed
imatrix : fix assert for src0 non-cont check
1 parent d391ae9 commit 2d5419d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/imatrix/imatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool IMatrixCollector::collect_imatrix(struct ggml_tensor * t, bool ask, void *
8080
// for simplicity, always copy src0 to host, because it is small
8181
// take into account that src0 is not contiguous!
8282
GGML_ASSERT(src0->ne[1] == src1->ne[1]);
83-
GGML_ASSERT(n_as*ggml_nrows(src0));
83+
GGML_ASSERT(n_as*ggml_nrows(src0)*sizeof(int) == GGML_PAD(ggml_nbytes(src0), n_as*sizeof(int)));
8484
m_ids.resize(ggml_nbytes(src0)/sizeof(int));
8585
ggml_backend_tensor_get(src0, m_ids.data(), 0, ggml_nbytes(src0));
8686

0 commit comments

Comments
 (0)