IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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_fwd_shape

def causal_conv1d_varlen_fwd_shape(x: T, weight: T, bias: T, conv_states: T, query_start_loc: T, cache_indices: T, has_initial_state: T) -> IndexList[Int(2)]

Computes the output shape for the causal_conv1d_varlen_fwd graph op.

Args:

  • ​x (T): Input tensor of concatenated sequence elements with shape (dim, total_seqlen).
  • ​weight (T): Convolution weight tensor with shape (dim, width).
  • ​bias (T): Per-channel bias tensor with shape (dim,).
  • ​conv_states (T): Slot-indexed in/out pool of conv states with shape (batch, dim, width - 1).
  • ​query_start_loc (T): Cumulative sequence lengths with shape (batch + 1,).
  • ​cache_indices (T): Indices into the conv_states pool with shape (batch,).
  • ​has_initial_state (T): Whether each sequence has an initial state with shape (batch,).

Returns:

IndexList[Int(2)]

Was this page helpful?