Expand description
The CPU backend. FP32 reference kernels first, because every other backend is tested against them, then INT8 kernels for AVX2, AVX-512 VNNI, AMX and NEON i8mm. See spec/10-cpu.md.
One of the six crates where unsafe is allowed. Every block carries a // SAFETY: comment
that names the invariant which makes it sound.
Re-exports§
Modules§
- attention
- Multi head self attention over a batch of sequences packed end to end.
- compat
- The Laya compat graph on the reference kernels: ModernBERT or mmBERT, the type embedding, the
two layer decision head, the option scorer and the act head, as
DecisionModel.forwardin Laya 0.3.7 runs them in FP32. - gemm
- FP32 matrix products in the layout of a PyTorch
Linear:y = x wᵀ + b, withxas[m, k]andwas[n, k], both row major. - ops
- The elementwise and per row ops of the compat graph, in FP32.
- par
- Splitting work across threads.