MCPcopy Create free account
hub / github.com/Niko1221/Strata / block_dot

Function block_dot

engine/src/kernels/cpu/expert.cpp:73–76  ·  view source on GitHub ↗

32 codes against 32 int8 activations. Codes 0 contribute nothing to `sum(c*xhat)`, so the zero lanes the narrow load leaves behind are harmless.

Source from the content-addressed store, hash-verified

71/// 32 codes against 32 int8 activations. Codes 0 contribute nothing to `sum(c*xhat)`, so the zero lanes the
72/// narrow load leaves behind are harmless.
73inline __m256i block_dot(const uint8_t* codes, const int8_t* xq) {
74 return _mm256_dpbusd_epi32(_mm256_setzero_si256(), unpack_q2_0(codes),
75 _mm256_load_si256((const __m256i*) xq));
76}
77
78inline float hsum_ps(__m256 v) {
79 const __m128 s = _mm_add_ps(_mm256_castps256_ps128(v), _mm256_extractf128_ps(v, 1));

Callers 1

row_dotFunction · 0.85

Calls 1

unpack_q2_0Function · 0.85

Tested by

no test coverage detected