Skip to main content

ftts_kernels/
lib.rs

1#![deny(unsafe_op_in_unsafe_fn)]
2
3//! The sole crate permitted to contain audited kernel `unsafe` islands.
4//!
5//! Every future unsafe kernel must be feature-gated, carry a `SAFETY:` comment,
6//! and retain a bit-identical safe scalar fallback.
7//!
8//! ## Frankentorch boundary
9//!
10//! This Phase-0 scaffold intentionally has no frankentorch dependency: it does
11//! not yet expose a kernel facade that consumes one. Add each dependency only
12//! alongside a real facade API and its scalar fallback; do not predeclare a
13//! machine-local or otherwise unused substrate dependency.
14//!
15//! # Permanent integer-kernel law
16//!
17//! A route cannot become dispatchable until [`selftest::run_selftest`] proves its all-extreme
18//! reduction at every model-specific census binding row against an independent i64 oracle: the
19//! U8S8 envelope (`255 * 127 * K`, the ceiling for a future unsigned-activation VNNI route) on
20//! the checked scalar path, and the S8S8 kernel contract (`±127 * 127 * K`) through the real
21//! [`int8::dot_i32`] on every available tier with scalar equality. Every native tier, Q4 unpack
22//! path, codec convolution, verifier, and batched variant extends that same surface before it
23//! may be selected.
24
25pub mod f32ref;
26pub mod int8;
27pub mod mmap;
28pub mod route;
29pub mod selftest;
30pub mod sleef;
31pub mod startup_env;
32pub mod team;
33
34/// Identifies this crate's scaffold revision.
35pub const SCAFFOLD_REVISION: u8 = 1;