Expand description
FFI bindings to the C kernels in c-kernels/.
These wrappers provide safe Rust interfaces to the compiled C implementations of the hot numerical loops. The Rust side handles all validation; the C code only performs the tight inner loops.
Functionsยง
- c_
compressed_ attention_ logits - Compute compressed attention logits via C kernel.
- c_
decode_ vector_ block - Decode a vector block: gather codewords by index.
- c_
encode_ vector_ block - Encode a vector block: find nearest codeword for each block of
block_dimfloats. Returns the codeword indices. - c_
softmax - Numerically stable softmax via C kernel.