Kwker

Kwker 0.1.0 release notes

Note

Draft. The version number, package names and download links take effect with the release.

Kwker 0.1.0 is the first public release. It sorts, selects, ranks, searches, merges and groups keys of 4 to 128 bits, strings and tables, with indices, values or records. SIMD engines for AVX-512, AVX2, SSE4.2, ARM NEON and ARM SVE and a portable fallback are chosen at run time. For PyTorch on x86-64 Linux it also replaces CPU kernels and runs CNNs, BERT-family encoders and Llama-family, mixture-of-experts and GPT-2-family decoders natively.

Speed

Kwker is compared against the fastest public library for each operation: x86-simd-sort and VQSort for sorts, their key-value and selection forms for those operations. Every ratio below is Kwker's speed over the faster of the two, one thread, measured on Intel Xeon cloud VMs with AVX-512 (the per-call grid on a Cascade Lake Xeon). The AVX2 figures run the AVX2 engine and the competitors' AVX2 builds on the same CPUs.

Benchmark AVX-512 AVX2
Sort sweep: 6 key types x 40 input families x 1K / 100K / 1M keys (720 cells), geomean 1.99x 2.14x
Sort sweep cells below 1.0x 12 of 720 23 of 720
Per-call sorts of 2 to 900 keys, 7 input patterns x 6 key types (672 cells), geomean 2.84x 3.01x
Per-call cells below 1.0x 2 of 672 1 of 672

On real data never used for tuning (token ids, model weights, file-system metadata; 1K, 100K and 1M keys, 17 cells per engine) no AVX-512 cell was below 1.25x and no AVX2 cell below 1.0x. The cells where Kwker trails are listed in Known limitations: mostly near-bandwidth inputs (all equal, three values) and duplicate-heavy 64-bit floats at 100K-1M keys. Your hardware will differ: python -m kwker.bench measures your own machine, and python -m kwker.bench --suite --native repeats the sort sweep's input patterns there against x86-simd-sort and VQSort built for your CPU.

What is in it

Platforms

Linux x86-64 and ARM64, Windows x64 and macOS ARM64 have prebuilt packages; Windows ARM64 and macOS x86-64 build from source. The installation guide lists each package; Compatibility lists the toolchains, Python and torch releases each one is tested with.

Compatibility

0.1.x releases keep the C ABI, the C++ header, the Rust crate's public API, the Python API and the torch operator schemas compatible. Sorts, selections and stable key-value sorts return the same output on every engine and in every 0.1.x release; index operations break ties by index. A public name is deprecated for at least one minor release before it is removed; nothing is deprecated in 0.1.0. The details are in Compatibility.

Known limitations

See Known limitations. In short: