Windows native port: serve-mode pipe fix + RAM detection + POSIX guards, AVX-VNNI kernel, gated CUDA DLL (#131, fixes #123)

Rebased onto current dev, split into 3 logical parts (all validated):
1. CPU portability (serve-mode _O_BINARY pipe fix — stock main hangs on MinGW without it; RAM detection cap 0->9/layer; POSIX guards for select/mmap/madvise; warmup script).
2. AVX-VNNI 128-bit int8/int4 dot kernel (Alder Lake+/Meteor Lake+), bit-identical to AVX2 (author-verified on Meteor Lake; compiles out to AVX2 elsewhere) + _mm256_extracti128_si256 typo fix that blocked -march=native.
3. CUDA DLL via LoadLibrary, gated behind CUDA_DLL=1 (host never links cudart; silent CPU fallback if absent; author-verified on RTX 5070 Ti).

Validated here: make check 59/59, oracle 32/32 TF, Windows cross-compile clean + glm.exe loads+runs via WSL interop. Fixes the #123 Windows build failure.
This commit is contained in:
woolcoxm
2026-07-13 14:54:30 -04:00
committed by GitHub
parent afc259c599
commit 2319b942d2
10 changed files with 644 additions and 30 deletions
+11
View File
@@ -11,15 +11,26 @@ desktop/src-tauri/gen/
# binari compilati (si rigenerano con make / coli build)
c/glm
c/glm.exe
c/olmoe
c/olmoe.exe
c/iobench
c/iobench.exe
c/tok_test
c/backend_cuda.o
c/backend_cuda_test
c/backend_loader.o
c/coli_cuda.dll
c/coli_cuda.lib
c/coli_cuda.exp
c/tests/test_json
c/tests/test_json.exe
c/tests/test_st
c/tests/test_st.exe
c/tests/test_tier
c/tests/test_tier.exe
c/tests/test_grammar
c/tests/test_grammar.exe
# oracoli tiny generati (make_glm_oracle.py) e dati benchmark scaricati
c/glm_tiny/