Recurrent Commit Policy Factory#

std::unique_ptr<RecurrentCommitPolicy> trt_edgellm::rt::makeRecurrentCommitPolicy(
StateKind mixerKind,
RecurrentCommitPolicy::Config const &config,
std::vector<rt::Tensor> &liveRecurrent,
std::vector<rt::Tensor> &liveConv,
cudaStream_t stream
)#

Build the commit policy for a layer’s mixer kind over references to its live recurrent/conv slabs.

Throws:

std::runtime_error – when the kind is not a recurrent mixer (only kMamba2/kGdn commit).

void trt_edgellm::rt::declareRecurrentSpecVerifyBindings(
StateKind mixerKind,
RecurrentCommitPolicy::Config const &config,
int32_t recurrentLayerIdx,
TensorRegistry &reg
)#

Declare the spec-verify intermediate-state output bindings a recurrent layer of the given mixer kind emits during prefill/verification, under the layer’s local recurrent-layer index (0-based over recurrent layers only, as the builder profiles and runtime tensor map key these names). In an interleaved hybrid the local index differs from the absolute layer index; using the local index is what makes the declared output names match the tensors the runtime binds. mamba2 declares the four replay-stash outputs; gdn declares the single full-state snapshot. Both declare the conv snapshot when the layer carries a convolution. The engine sees no runtime mode flag: the kind alone selects the output set, matching the commit path the policy of that kind runs.