Expand description
§Serial SSD with a custom, memory-efficient backward (Mamba-3 single-SSD)
The SerialRecalculated path for the single-SSD pathway. The forward is the
same serial scan as super::super::serial, routed through the
Mamba3SingleSsdBackendExt trait so Autodiff backends substitute a
custom backward that recomputes per-chunk intermediates rather than storing
them (see super::backward / super::combined_backward). Unlike the
double-SSD form, the kernels here apply the trapezoid gamma/scale and the
boundary-β seed internally, so the backward also returns d_gamma/d_scale.
The default body runs under a generic backend B, where the high-level
Tensor (pinned to Dispatch) is unavailable, so the K1–K5 math goes
through the rank-tagged F primitive wrapper. K1–K4 are mode-agnostic and
reused from the double-SSD forward; only the single-SSD K5 (strict-lower
intra-chunk + γ-correction) is owned here, and it is forward-only.
Traits§
- Mamba3
Single SsdAutodiff Backend Ext - Marker for an autodiff-capable backend that also implements the SSD extension trait (so the custom memory-efficient backward is available).
- Mamba3
Single SsdBackend Ext - Extends the backend for the memory-efficient single-ssd form serial SSD.
Functions§
- k5_
single_ 🔒ssd_ chunk_ scan - SingleSsd chunk scan, on primitives.