Skip to main content

Module serial_recalculated

Module serial_recalculated 

Source
Expand description

§Serial SSD with a custom, memory-efficient backward (Mamba-3 double-SSD)

The SerialRecalculated path for the double-SSD pathway. The forward is the same serial scan as super::super::serial, routed through the Mamba3DoubleSsdBackendExt trait so that Autodiff backends substitute a custom backward that recomputes per-chunk intermediates instead of storing them (see super::backward / super::combined_backward). Plain backends use the trait’s default body, which replays the serial kernels.

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/K2/K4 are reused by the recompute backward in super::combined_backward; K5 is forward-only.

Traits§

Mamba3DoubleSsdAutodiffBackendExt
Marker for an autodiff-capable backend that also implements the SSD extension trait (so the custom memory-efficient backward is available).
Mamba3DoubleSsdBackendExt
Extends the backend for the memory-efficient serial recalculated SSD.

Functions§

k1_ssd_chunk_cumsum 🔒
Primitive port of super::super::serial::k1_ssd_chunk_cumsum.
k2_ssd_bmm 🔒
Primitive port of super::super::serial::k2_ssd_bmm (fused L·M).
k3_ssd_chunk_state 🔒
Primitive port of super::super::serial::k3_ssd_chunk_state (lean: returns only the chunk-end state).
k4_ssd_state_passing 🔒
Primitive port of super::super::serial::k4_ssd_state_passing.
k5_ssd_chunk_scan 🔒
Primitive port of super::super::serial::k5_ssd_chunk_scan.