Files
leleka/tools/kernel-ab/cpp/avxvnni_probe.cpp
T
Pavlo RatushnyiandClaude Sonnet 5.5 9b39c56968 tools/kernel-ab: out-of-tree C++ reference generator for the CPU kernel A/B (STRA-248)
KAB1 files-only exchange: kab gen writes case-<id>.in (64-byte header, synthetic
blocks), runs the unchanged engine/strata CPU expert kernels for tree avx512 and
tree avx2 (two scrubbed child processes) and writes case-<id>.cpp-<tree>.out and
manifest.json last (tmp + rename, sha256 + length of every file, provenance).
verify_manifest.py (stdlib, Python >= 3.9) implements the reader rule with exit
0/1/2. The build is a Makefile over the pin's translation units and the pinned
ggml 3cf03257f (no cmake on the server; flags transcribed from the CMake files,
make check-pin detects drift). kab poolcheck proves the stage composition equals
the real ExpertPool bitwise. The time mode is STRA-317.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 20:04:55 +01:00

11 lines
476 B
C++

// The probe engine/strata/CMakeLists.txt runs as check_cxx_source_compiles(STRATA_HAVE_AVXVNNI_INTRINSICS), verbatim.
#include <immintrin.h>
#if defined(__GNUC__) || defined(__clang__)
__attribute__((target("avxvnni")))
#endif
static __m256i dots(__m256i a, __m256i b) { return _mm256_dpbusd_avx_epi32(_mm256_dpwssd_avx_epi32(a, a, b), a, b); }
int main() {
volatile int x = 1;
return _mm256_extract_epi32(dots(_mm256_set1_epi32(x), _mm256_set1_epi32(x)), 0) == 0;
}