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
varlen_selective_state_update_cpu
def varlen_selective_state_update_cpu[kernel_dtype: DType, DSTATE: Int](batch: Int, nheads: Int, dim: Int, nheads_ngroups_ratio: Int, pad_slot_id: Int32, dt_softplus: Int8, has_state_batch_indices: Int8, state: TileTensor[kernel_dtype, Storage=state.Storage, address_space=state.address_space, linear_idx_type=state.linear_idx_type], x: TileTensor[kernel_dtype, Storage=x.Storage, address_space=x.address_space, linear_idx_type=x.linear_idx_type], dt: TileTensor[kernel_dtype, Storage=dt.Storage, address_space=dt.address_space, linear_idx_type=dt.linear_idx_type], A: TileTensor[kernel_dtype, Storage=A.Storage, address_space=A.address_space, linear_idx_type=A.linear_idx_type], B: TileTensor[kernel_dtype, Storage=B.Storage, address_space=B.address_space, linear_idx_type=B.linear_idx_type], C: TileTensor[kernel_dtype, Storage=C.Storage, address_space=C.address_space, linear_idx_type=C.linear_idx_type], D: TileTensor[kernel_dtype, Storage=D.Storage, address_space=D.address_space, linear_idx_type=D.linear_idx_type], z: TileTensor[kernel_dtype, Storage=z.Storage, address_space=z.address_space, linear_idx_type=z.linear_idx_type], output: TileTensor[kernel_dtype, Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type], dt_bias: TileTensor[kernel_dtype, Storage=dt_bias.Storage, address_space=dt_bias.address_space, linear_idx_type=dt_bias.linear_idx_type], state_batch_indices: TileTensor[DType.int32, Storage=state_batch_indices.Storage, address_space=state_batch_indices.address_space, linear_idx_type=state_batch_indices.linear_idx_type], state_strides: IndexList[Int(4)], x_strides: IndexList[Int(3)], dt_strides: IndexList[Int(3)], dt_bias_strides: IndexList[Int(2)], A_strides: IndexList[Int(3)], B_strides: IndexList[Int(3)], C_strides: IndexList[Int(3)], D_strides: IndexList[Int(2)], z_strides: IndexList[Int(3)], out_strides: IndexList[Int(3)], ctx: Optional[DeviceContext] = None)
CPU kernel for varlen selective state update.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!