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[dtype: DType](x: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=x.static_spec], weight: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=weight.static_spec], bias: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=bias.static_spec], conv_states: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_states.static_spec], query_start_loc: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=query_start_loc.static_spec], cache_indices: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_indices.static_spec], has_initial_state: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=has_initial_state.static_spec]) -> IndexList[Int(2)]

Computes the output shape for the causal_conv1d_varlen_fwd graph op.

Parameters:

  • ​dtype (DType): Element type of the conv input, weight, bias, and conv state tensors.

Args:

Returns:

IndexList[Int(2)]