okami.mom/strata

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

Niko1221Merge f-own-2n (ead5a32ae) into f-own-int: the Arm NEON tier of the quant layer0a9381336

main
1.1 KiB34 linesraw
1// src/quant/registry.hpp - the per-tier kernel tables the dispatcher (dispatch.cpp) walks.  One table function per source file that holds kernels.
2#pragma once
3
4#include "strata/quant/act.hpp"
5#include "strata/quant/dot.hpp"
6
7namespace strata::quant {
8
9struct DotTable {
10    const DotKernel* v;
11    int n;
12};
13struct ActTable {
14    const ActKernel* v;
15    int n;
16};
17
18DotTable generic_dot_table() noexcept;   // dot_generic.cpp
19ActTable generic_act_table() noexcept;   // act_ref.cpp
20
21#ifdef STRATA_QUANT_X86_TIERS
22DotTable avx_dot_table() noexcept;       // x86/dot_avx.cpp      (Arith::Avx, Isa::Avx1)
23DotTable avx2_dot_table() noexcept;      // x86/dot_avx2.cpp     (Arith::Avx2, Isa::Avx2)
24ActTable avx_act_table() noexcept;       // x86/act_avx.cpp
25ActTable avx2_act_table() noexcept;      // x86/act_avx2.cpp
26DotTable avx512_dot_table() noexcept;    // x86/dot_avx512.cpp   (Arith::Avx2 bits in 512-bit lanes, Isa::Avx512)
27#endif
28
29#ifdef STRATA_QUANT_ARM_TIERS
30DotTable neon_dot_table() noexcept;      // arm/dot_neon.cpp     (Arith::Neon, Isa::Neon)
31ActTable neon_act_table() noexcept;      // arm/act_neon.cpp
32#endif
33
34}  // namespace strata::quant