Fix iqk_mul_mat when number of rows is not multiple of repack rows (#911)

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
Kawrakow
2025-11-06 19:07:46 +02:00
committed by GitHub
parent e15a215e6b
commit 49befdd4fb

View File

@@ -502,7 +502,8 @@ extern "C" IQK_API bool iqk_mul_mat(long Nx, long Ny, long ne00,
auto etypeA = ggml_type(typeA);
if (auto dequant_type = MulMat::is_dequant_better(etypeA, Ny);
dequant_type != etypeA && MulMat::prepare(dequant_type, typeB, ne00, mm, Ny)) {
dequant_type != etypeA && MulMat::prepare(dequant_type, typeB, ne00, mm, Ny) &&
Nx%MulMat::num_rows(ggml_type(dequant_type)) == 0) {
constexpr int k_x_step = 32;