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
selective_scan_update_cpu
def selective_scan_update_cpu[kernel_dtype: DType, DSTATE: Int](batch: Int, dim: Int, group_size: Int, delta_softplus: Int8, state_out: TileTensor[kernel_dtype, Storage=state_out.Storage, address_space=state_out.address_space, linear_idx_type=state_out.linear_idx_type], output: TileTensor[kernel_dtype, Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type], state_in: TileTensor[kernel_dtype, Storage=state_in.Storage, address_space=state_in.address_space, linear_idx_type=state_in.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], dt_bias: TileTensor[kernel_dtype, Storage=dt_bias.Storage, address_space=dt_bias.address_space, linear_idx_type=dt_bias.linear_idx_type], state_out_strides: IndexList[Int(3)], output_strides: IndexList[Int(2)], state_in_strides: IndexList[Int(3)], x_strides: IndexList[Int(2)], dt_strides: IndexList[Int(2)], A_strides: IndexList[Int(2)], B_strides: IndexList[Int(3)], C_strides: IndexList[Int(3)], D_strides: IndexList[Int(1)], z_strides: IndexList[Int(2)], dt_bias_strides: IndexList[Int(1)], ctx: Optional[DeviceContext] = None)
CPU kernel for selective scan update (single step).
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!