oa::FnMatrix::gruScan
gruScan: whole-sequence GRU recurrent scan in ONE dispatch (one workgroup per batch, looping all timesteps). Mathematically identical to running gruCellLinear for each timestep, but collapses S dispatches into 1. The recurrent weight/bias gradient is computed separately via linearWeightBiasBwd on the saved hPrev.
Function Documentation
gruScan: whole-sequence GRU recurrent scan in ONE dispatch (one workgroup per batch, looping all timesteps). Mathematically identical to running gruCellLinear for each timestep, but collapses S dispatches into 1. The recurrent weight/bias gradient is computed separately via linearWeightBiasBwd on the saved hPrev.
Parameters
inGatesIconst Matrix &[B*S, 3H] precomputed input projection (row b*S+t = timestep t)
inWeightHhconst Matrix &—
inHiddenSizeoa::I32—
inSeqLenoa::I32S
inBatchoa::I32—
inBiasHhconst Matrix &Default: Matrix{}
Returns
GruScanResultThe declared return value.