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_cpu
causal_conv1d_varlen_update_cpu[x_dtype: DType, weight_dtype: DType, bias_dtype: DType, output_dtype: DType, conv_state_dtype: DType, cache_seqlens_dtype: DType, conv_state_indices_dtype: DType](batch: Int, dim: Int, seqlen: Int, width: Int, state_len: Int, x: TileTensor[x_dtype, address_space=x.address_space, linear_idx_type=x.linear_idx_type, element_size=x.element_size], weight: TileTensor[weight_dtype, address_space=weight.address_space, linear_idx_type=weight.linear_idx_type, element_size=weight.element_size], bias: TileTensor[bias_dtype, address_space=bias.address_space, linear_idx_type=bias.linear_idx_type, element_size=bias.element_size], conv_state: TileTensor[conv_state_dtype, address_space=conv_state.address_space, linear_idx_type=conv_state.linear_idx_type, element_size=conv_state.element_size], cache_seqlens: TileTensor[cache_seqlens_dtype, address_space=cache_seqlens.address_space, linear_idx_type=cache_seqlens.linear_idx_type, element_size=cache_seqlens.element_size], conv_state_indices: TileTensor[conv_state_indices_dtype, address_space=conv_state_indices.address_space, linear_idx_type=conv_state_indices.linear_idx_type, element_size=conv_state_indices.element_size], output: TileTensor[output_dtype, address_space=output.address_space, linear_idx_type=output.linear_idx_type, element_size=output.element_size], x_batch_stride: UInt32, x_dim_stride: UInt32, x_seqlen_stride: UInt32, weight_dim_stride: UInt32, weight_width_stride: UInt32, conv_state_batch_stride: UInt32, conv_state_dim_stride: UInt32, conv_state_seqlen_stride: UInt32, out_batch_stride: UInt32, out_dim_stride: UInt32, out_seqlen_stride: UInt32, silu_activation: Bool, pad_slot_id: Int32, has_conv_state_indices: Bool, has_cache_seqlens: Bool, has_bias: Bool)
Update function for causal conv1d decode.
Updates the convolution state and computes output for decode steps. Supports circular buffer state management with cache_seqlens.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!