For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
causal_conv1d_varlen_states_shape
def causal_conv1d_varlen_states_shape(x: T, cu_seqlens: T) -> IndexList[Int(3)]
Returns the output shape for the causal_conv1d_varlen_states op.
The output is a state buffer with one entry per sequence: shape
(batch, dim, state_len). The state_len dimension is determined by
the output allocation at runtime; this function returns 0 for that
dimension as a placeholder.
Args:
- x (
T): Packed input tensor with shape(total_tokens, dim). - cu_seqlens (
T): Cumulative sequence lengths with shape(batch + 1,).
Returns:
IndexList[Int(3)]: The output state shape (batch, dim, 0) where batch is inferred
from cu_seqlens and state_len is filled at runtime.