Expand description
§Serial SSD with a custom, memory-efficient backward (Mamba-2)
This is the SerialRecalculated path. The forward is the same five-kernel
serial scan as super::super::serial, but it is routed through the
Mamba2BackendExt trait so that Autodiff backends can substitute a
custom backward that recomputes the per-chunk intermediates instead of
storing them (see super::backward / super::combined_backward),
trading a little extra compute for ~⅓ less training memory.
Every plain (non-autodiff) backend uses the trait’s default body, which
simply replays the super::super::serial kernels K1–K5. The
crate::impl_ssd_backend_ext_for_burn_backends! /
crate::decl_ssd_autodiff_backend_ext! macros wire up the per-backend
impls and the autodiff marker trait.
Traits§
- Mamba2
Autodiff Backend Ext - Marker for an autodiff-capable backend that also implements the SSD extension trait (so the custom memory-efficient backward is available).
- Mamba2
Backend Ext - Extends the backend and wraps it for
burn.
Functions§
- k1_
ssd_ 🔒chunk_ cumsum - Primitive port of
crate::mamba2::ssd::serial::k1_ssd_chunk_cumsum. - k2_
ssd_ 🔒bmm - Primitive port of
crate::mamba2::ssd::serial::k2_ssd_bmm. - k3_
ssd_ 🔒chunk_ state - Primitive port of
crate::mamba2::ssd::serial::k3_ssd_chunk_state(lean: returns only the chunk-end state). - k4_
ssd_ 🔒state_ passing - Primitive port of
crate::mamba2::ssd::serial::k4_ssd_state_passing. - k5_
ssd_ 🔒chunk_ scan - Primitive port of
crate::mamba2::ssd::serial::k5_ssd_chunk_scan.