Skip to content

Commit 665434e

Browse files
ikawrakowIwan Kawrakow
andauthored
Fix iqk_mul_mat when number of rows is not multiple of repack rows (#911)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 0378f38 commit 665434e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/iqk/iqk_mul_mat.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ extern "C" IQK_API bool iqk_mul_mat(long Nx, long Ny, long ne00,
502502

503503
auto etypeA = ggml_type(typeA);
504504
if (auto dequant_type = MulMat::is_dequant_better(etypeA, Ny);
505-
dequant_type != etypeA && MulMat::prepare(dequant_type, typeB, ne00, mm, Ny)) {
505+
dequant_type != etypeA && MulMat::prepare(dequant_type, typeB, ne00, mm, Ny) &&
506+
Nx%MulMat::num_rows(ggml_type(dequant_type)) == 0) {
506507

507508
constexpr int k_x_step = 32;
508509

0 commit comments

Comments
 (0)