Skip to content

Commit 6408b94

Browse files
author
Iwan Kawrakow
committed
Fix mul_mat_moe and fused_up_gate
1 parent e5a0668 commit 6408b94

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ggml/src/iqk/iqk_mul_mat.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,7 @@ extern "C" IQK_API bool iqk_mul_mat_moe(long Nx, long Ny, long ne00, int ne11,
612612
first_x *= num_rows;
613613
nrc_x *= num_rows;
614614

615-
auto type_size = ggml_type_size(dequant_type);
616-
617-
size_t row_size_qx = ne00*type_size;
615+
size_t row_size_qx = ggml_row_size(dequant_type, ne00);
618616
size_t row_size_qy = strideB;
619617

620618
DataInfo info{C + first_x, (const char *)B, nb1/sizeof(float), row_size_qy, 0, ne11, row_mapping, nb2/sizeof(float)};
@@ -680,9 +678,7 @@ extern "C" IQK_API bool iqk_moe_fused_up_gate(long Nx, long Ny, long ne00, int n
680678
first_x *= num_rows;
681679
nrc_x *= num_rows;
682680

683-
auto type_size = ggml_type_size(dequant_type);
684-
685-
size_t row_size_qx = ne00*type_size;
681+
size_t row_size_qx = ggml_row_size(dequant_type, ne00);
686682
size_t row_size_qy = strideB;
687683

688684
DataInfo info{C + first_x, (const char *)B, nb1/sizeof(float), row_size_qy, 0, ne11, row_mapping, nb2/sizeof(float)};

0 commit comments

Comments
 (0)