okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-own-2a (7c09c4a75) into f-own-int: the Strata quant layer and the x86 CPU rows9c143c403

main
1.2 KiB34 linesraw
1// src/quant/generic.hpp - the Generic-contract dot products (dot_generic.cpp), which the x86 tiers call where ggml's own x86 code falls back to its
2// generic C (a type with no SIMD branch for the flavour).  Weight row, activation row, n elements.
3#pragma once
4
5#include "internal.hpp"   // STRATA_RESTRICT
6
7namespace strata::quant::generic {
8
9#define STRATA_GENERIC_DOT(name) void dot_##name##_generic(int n, float* STRATA_RESTRICT s, const void* STRATA_RESTRICT vx, const void* STRATA_RESTRICT vy)
10STRATA_GENERIC_DOT(q2_0_q8_0);
11STRATA_GENERIC_DOT(q4_0_q8_0);
12STRATA_GENERIC_DOT(q4_1_q8_1);
13STRATA_GENERIC_DOT(q5_0_q8_0);
14STRATA_GENERIC_DOT(q5_1_q8_1);
15STRATA_GENERIC_DOT(q8_0_q8_0);
16STRATA_GENERIC_DOT(iq4_nl_q8_0);
17STRATA_GENERIC_DOT(mxfp4_q8_0);
18STRATA_GENERIC_DOT(nvfp4_q8_0);
19STRATA_GENERIC_DOT(q2_K_q8_K);
20STRATA_GENERIC_DOT(q3_K_q8_K);
21STRATA_GENERIC_DOT(q4_K_q8_K);
22STRATA_GENERIC_DOT(q5_K_q8_K);
23STRATA_GENERIC_DOT(q6_K_q8_K);
24STRATA_GENERIC_DOT(iq1_s_q8_K);
25STRATA_GENERIC_DOT(iq1_m_q8_K);
26STRATA_GENERIC_DOT(iq2_xxs_q8_K);
27STRATA_GENERIC_DOT(iq2_xs_q8_K);
28STRATA_GENERIC_DOT(iq2_s_q8_K);
29STRATA_GENERIC_DOT(iq3_xxs_q8_K);
30STRATA_GENERIC_DOT(iq3_s_q8_K);
31STRATA_GENERIC_DOT(iq4_xs_q8_K);
32#undef STRATA_GENERIC_DOT
33
34}  // namespace strata::quant::generic