Skip to content

vllm.model_executor.layers.mamba.ops.scatter_states

Functions:

  • scatter_states –

    Scatter src rows into state at indices (in place).

scatter_states(state, src, indices)

Scatter src rows into state at indices (in place).

Equivalent to state[indices] = src but non-atomic and bandwidth-bound, since mamba cache slots are unique per sequence. Rows indexed NULL_BLOCK_ID (padded or dummy requests) are skipped, leaving the null block untouched. gather_initial_states is the read-side counterpart.