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
selective_scan_fwd_cpu
def selective_scan_fwd_cpu[kernel_dtype: DType, DSTATE: Int](batch: Int, dim: Int, seqlen: Int, group_size: Int, delta_softplus: Int8, output: TileTensor[kernel_dtype, Engine=output.Engine, address_space=output.address_space, linear_idx_type=output.linear_idx_type], x: TileTensor[kernel_dtype, Engine=x.Engine, address_space=x.address_space, linear_idx_type=x.linear_idx_type], out_z: TileTensor[kernel_dtype, Engine=out_z.Engine, address_space=out_z.address_space, linear_idx_type=out_z.linear_idx_type], u: TileTensor[kernel_dtype, Engine=u.Engine, address_space=u.address_space, linear_idx_type=u.linear_idx_type], delta: TileTensor[kernel_dtype, Engine=delta.Engine, address_space=delta.address_space, linear_idx_type=delta.linear_idx_type], A: TileTensor[kernel_dtype, Engine=A.Engine, address_space=A.address_space, linear_idx_type=A.linear_idx_type], B: TileTensor[kernel_dtype, Engine=B.Engine, address_space=B.address_space, linear_idx_type=B.linear_idx_type], C: TileTensor[kernel_dtype, Engine=C.Engine, address_space=C.address_space, linear_idx_type=C.linear_idx_type], D: TileTensor[kernel_dtype, Engine=D.Engine, address_space=D.address_space, linear_idx_type=D.linear_idx_type], z: TileTensor[kernel_dtype, Engine=z.Engine, address_space=z.address_space, linear_idx_type=z.linear_idx_type], delta_bias: TileTensor[kernel_dtype, Engine=delta_bias.Engine, address_space=delta_bias.address_space, linear_idx_type=delta_bias.linear_idx_type], output_strides: IndexList[Int(3)], x_strides: IndexList[Int(4)], out_z_strides: IndexList[Int(3)], u_strides: IndexList[Int(3)], delta_strides: IndexList[Int(3)], A_strides: IndexList[Int(2)], B_strides: IndexList[Int(4)], C_strides: IndexList[Int(4)], D_strides: IndexList[Int(1)], z_strides: IndexList[Int(3)], delta_bias_strides: IndexList[Int(1)], ctx: Optional[DeviceContext] = None)
CPU kernel for selective scan forward pass.