keyless.rs: SKLROUT1 artifact admission (layout cross-read against prepare-keyless-routing.py),
fmaf-order query routing, positional key reconstruction. cvec.rs: GGUF v3 parsing and the
load_control_vectors table builder (19 golden cases incl. the Original's error texts,
bit-exact, from the Original function extracted verbatim) and a reduction-tree twin of
cvec_kernel. attn.rs: scratch arithmetic and an f64 GQA reference. The emulated kernel
text reproduces routing and cvec bit for bit and attention modes 2/3/4 (incl. M-RoPE) to
1.6e-7 relative L2.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kv_plan/qsa_state_bytes/host copy sizing equal layer.cpp's own functions (extracted verbatim)
over 480 format x context x ring x --kv-resident cases. StreamMap::resolve models the
kernel's three phases sequentially; the miss-list order is the only device nondeterminism
and is supplied as input. The literal kv_stream.cu text, run with 1024 emulated threads,
reproduces the model state after each of 45 calls with constant eviction.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Six offline-compilation sources spliced verbatim from the Original (kv_q4.cu, kv_q8.cu,
kv_stream.cu, keyless.cu, cvec.cu, qsa_decode_attn.cu modes 2/3/4) with flat extern C
entries; kernel bodies are byte-identical, only signatures and launch geometry moved.
A thread-per-CUDA-thread emulation header runs the kernel text on the host; the FWHT,
Q4_0, INT8, V-only, K8V4 and streaming-append paths match the Rust references bit for
bit (new cache module = CPU twin of the pool data movement). No GPU, no nvcc.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>