Skip to main content

burn_mamba/mamba3/ssd/serial_recalculated/
backward.rs

1// TODO: Implement a memory-efficient custom backward for the MIMO-first SSD.
2//
3// The previous implementation used the old Mamba-2 interface (x_bnlhp, dt_discretized_bhnl,
4// b_bnlgr, c_bnlgr, d_h, ...). With the MIMO-first refactor, the interface is now:
5//   v_bnlrhp [b,n,l,R,H,P], da_bnlh [b,n,l,H], b_bnlrhn [b,n,l,R,H,N], c_bnlrhn, ...
6//
7// Until this is updated, Autodiff<B, C> uses the default trait implementation
8// (standard autodiff through K2-K5), which is correct but not memory-optimised.
9//
10// The custom backward logic lives in combined_backward.rs and also needs updating.