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

GruScanResult oa::FnMatrix::gruScan( const Matrix & inGatesI, const Matrix & inWeightHh, oa::I32 inHiddenSize, oa::I32 inSeqLen, oa::I32 inBatch, const Matrix & inBiasHh = Matrix{} )
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

inGatesI
const Matrix &

[B*S, 3H] precomputed input projection (row b*S+t = timestep t)

inWeightHh
const Matrix &

inHiddenSize
oa::I32

inSeqLen
oa::I32

S

inBatch
oa::I32

inBiasHh
const Matrix &

Default: Matrix{}

Returns

GruScanResult

The declared return value.