For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
causal_conv1d_varlen_update_shape
def causal_conv1d_varlen_update_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], cache_seqlens: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_seqlens.static_spec], conv_state_indices: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_state_indices.static_spec]) -> IndexList[Int(3)]
Returns the output shape for the causal_conv1d_varlen_update op.
The output shape equals the input shape (batch, dim, seqlen).
Parameters:
- βdtype (
DType): Element type of thex,weight, andbiasinput tensors.
Args:
- βx (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=x.static_spec]): Input tensor with shape(batch, dim, seqlen). - βweight (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=weight.static_spec]): Convolution weights with shape(dim, width). - βbias (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=bias.static_spec]): Per-channel bias with shape(dim,). - βcache_seqlens (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_seqlens.static_spec]): Current sequence lengths per batch entry with shape(batch,). - βconv_state_indices (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_state_indices.static_spec]): Indices into the conv state buffer with shape(batch,).
Returns:
IndexList[Int(3)]: The output tensor shape, equal to x.shape().
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!