Skip to content

Commit e94d1a9

Browse files
ikawrakowIwan Kawrakow
andauthored
Attempt to fix AVX2 FA (ikawrakow#807)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 3d4977c commit e94d1a9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ggml/src/iqk/fa/iqk_fa_templates.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ struct HelperQ8KV final : public BaseHelper {
226226
struct HelperQ80 final : public BaseHelper {
227227
using Base = BaseHelper;
228228
constexpr static ggml_type type = GGML_TYPE_Q8_0;
229-
#ifdef HAVE_FANCY_SIMD
229+
//#ifdef HAVE_FANCY_SIMD
230+
#ifdef __AVX2__
230231
using block_q8 = block_q8_2;
231232
constexpr static int block_size_q = QK8_2;
232233
#else

ggml/src/iqk/iqk_gemm_legacy_quants.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,9 +3299,12 @@ inline std::pair<mul_mat_t, int> mul_mat_kernel(int int_typeA, int nq) {
32993299
if (nq == 4) return std::make_pair(mul_mat_qX_0_q8_2_Tx<Q8_0_1_Unpacker, 4, k_step>, 4);
33003300
MAKE_FUNCS(mul_mat_qX_1_q8_2_T<Q8_0_1_Unpacker, nq);
33013301
#else
3302-
if (nq == 1) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 1, k_step>, 1);
3303-
if (nq == 2) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 2, k_step>, 2);
3304-
if (nq == 4) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 4, k_step>, 4);
3302+
//if (nq == 1) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 1, k_step>, 1);
3303+
//if (nq == 2) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 2, k_step>, 2);
3304+
//if (nq == 4) return std::make_pair(mul_mat_qX_0_q8_0_Tx<Q8_0_Unpacker, 4, k_step>, 4);
3305+
if (nq == 1) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 1, block_q8_2>, 1);
3306+
if (nq == 2) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 2, block_q8_2>, 2);
3307+
if (nq == 4) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 4, block_q8_2>, 4);
33053308
if (nq == 3) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 3, block_q8_2>, 3);
33063309
if (nq == 5) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 5, block_q8_2>, 5);
33073310
if (nq == 6) return std::make_pair(mul_mat_qX_0_q8_0_T<Q8_0_Unpacker, 6, block_q8_2>, 6);

0 commit comments

Comments
 (0)