Files
Niko1221 2ca83480cd clean-p2: P-7 x86 tier from the specs (dot_avx2, act_avx512, kq dots; old files untouched)
New files (replacements, same interfaces):
  engine/src/quant/x86/dot_avx2_clean.cpp     table + six _opt kernels + three x4 kernels, bit-identical to the plain kernels of the TU
  engine/src/quant/x86/act_avx512_clean.cpp   AVX-512 Q8_0 / Q8_1 / Q8_K quantisers, byte-identical to the Avx2 contract
  engine/src/kernels/cpu/kq_dots_avx2.{hpp,cpp}  Q4_K / Q5_1 / Q8_0 multi-token dots, bit-identical per token to the single-token Avx2 dots

Float orders were found by black-box probing of the current kernels (tests/clean_p2/probe_*.cpp, model_*.cpp), then
confirmed on random rows. Tests: dot_avx2_verify, act_avx512_verify (needs AVX-512), kq_dots_avx2_test, plus the probes,
a manual build script for the quant layer and Windows (MSVC) drivers.
2026-12-01 01:57:16 +01:00

17 lines
742 B
C++

// probe_lanes: which elements of one block share an accumulator lane in a dot kernel (Q8 activation, one block); see probe_core.hpp.
// usage: probe_lanes <q8_0|q4_K|q5_K|q6_K|iq4_xs|iq3_xxs> [trials]
#include "probe_core.hpp"
int main(int argc, char** argv) {
const std::string name = argc > 1 ? argv[1] : "q8_0";
const int trials = argc > 2 ? atoi(argv[2]) : 40;
ProbeType* t = find_probe_type(name);
if (!t) { printf("unknown type\n"); return 1; }
const DotKernel* k = dot_kernel(t->type, Arith::Avx2, Isa::Avx2);
printf("kernel %s, block %d elements\n", k->name, t->elems);
std::mt19937_64 rng(5);
LanePartition lp = lane_partition(*t, k, rng, trials);
print_partition(lp, t->elems);
return 0;
}