Skip to content

Commit f7c5a94

Browse files
ikawrakowIwan Kawrakow
andauthored
Better gemm/gemv on AVX2 fr q4_0_r8 (#331)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 1bbb143 commit f7c5a94

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ggml/src/iqk/iqk_mul_mat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,8 +3620,7 @@ inline __m256i accum_q4_0_quants(const __m256i * v, const int8_t * qs) {
36203620
_mm256_maddubs_epi16(v[5], _mm256_shuffle_epi32(yh, 0x55)));
36213621
auto sumi4 = _mm256_add_epi16(_mm256_maddubs_epi16(v[6], _mm256_shuffle_epi32(yh, 0xaa)),
36223622
_mm256_maddubs_epi16(v[7], _mm256_shuffle_epi32(yh, 0xff)));
3623-
auto sumi = _mm256_add_epi32(_mm256_madd_epi16(_mm256_set1_epi16(1), _mm256_add_epi16(sumi1, sumi2)),
3624-
_mm256_madd_epi16(_mm256_set1_epi16(1), _mm256_add_epi16(sumi3, sumi4)));
3623+
auto sumi = _mm256_madd_epi16(_mm256_set1_epi16(1), _mm256_add_epi16(_mm256_add_epi16(sumi1, sumi2), _mm256_add_epi16(sumi3, sumi4)));
36253624
#endif
36263625
return sumi;
36273626
}

0 commit comments

Comments
 (0)