MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / hsum_float_8

Function hsum_float_8

src/quant.cpp:46–52  ·  view source on GitHub ↗

horizontally add 8 floats

Source from the content-addressed store, hash-verified

44#if __AVX__ || __AVX2__ || __AVX512F__
45// horizontally add 8 floats
46static inline float hsum_float_8(const __m256 x) {
47 __m128 res = _mm256_extractf128_ps(x, 1);
48 res = _mm_add_ps(res, _mm256_castps256_ps128(x));
49 res = _mm_add_ps(res, _mm_movehl_ps(res, res));
50 res = _mm_add_ss(res, _mm_movehdup_ps(res));
51 return _mm_cvtss_f32(res);
52}
53
54// shuffles to pick the required scales in dot products
55static inline __m256i get_scale_shuffle_q3k(int i) {

Callers 2

ggml_vec_dot_q3_K_q8_KFunction · 0.85
ggml_vec_dot_q2_K_q8_KFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected