Whole-workspace rustfmt pass picked up while iterating on Mamba GPU
backward work. Verified formatting-only via diff sampling; no logic
changed.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Phase 4/5 of the rustytorch f32→f64 plan. GenericLinear's 3
`impl<B: Backend<FloatElem = f32>>` blocks relaxed to `impl<B: Backend>`
(from_weights takes &[B::FloatElem]; Xavier scale via B::FloatElem::from_f64), so a
Linear→ReLU→Linear MLP runs end-to-end on CpuBackendF64. f32 backward-compat holds
via B::FloatElem = f32.
Capstone (tests/f64_mlp_precision.rs): a 4→8→1 MLP gradient checked vs central
finite differences — f64 err 6.99e-12 (≤1e-9) vs f32 err 1.01e-2, i.e. f64 ~1.45e9×
more accurate. This is the quantum-precision-gradient win that motivated the migration.
Validated: rtx-nn 334 f32 lib tests + 2 new f64 capstone tests pass; rtx-autograd
builds + tests pass; **QPUDIDP qpu-didp-surrogate compiles + 15 tests pass** (uses
GenericLinear). clippy clean.
Scope note: rtx-autograd's reverse-mode tape stores f32 concretely
(backward()->HashMap<_,Vec<f32>>) — making it f64 is a deep tape re-architecture, not
a constraint relaxation, so it's a documented follow-on (no current consumer uses it;
QPUDIDP hand-rolls f64 backprop). Other rtx-nn layers (conv/transformer/attention/...)
remain f32-gated — same mechanical relaxation, follow-on.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>