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_scan_fwd_gpu
varlen_selective_scan_fwd_gpu[kernel_dtype: DType, DSTATE: Int, u_LT: TensorLayout, delta_LT: TensorLayout, A_LT: TensorLayout, B_LT: TensorLayout, C_LT: TensorLayout, D_LT: TensorLayout, z_LT: TensorLayout, delta_bias_LT: TensorLayout, ssm_states_LT: TensorLayout, output_LT: TensorLayout, query_start_loc_LT: TensorLayout, cache_indices_LT: TensorLayout, has_initial_state_LT: TensorLayout](dim: Int, ngroups: Int, batch: Int, pad_slot_id: Int32, delta_softplus: Int8, u: TileTensor[kernel_dtype, u_LT, MutExternalOrigin], delta: TileTensor[kernel_dtype, delta_LT, MutExternalOrigin], A: TileTensor[kernel_dtype, A_LT, MutExternalOrigin], B: TileTensor[kernel_dtype, B_LT, MutExternalOrigin], C: TileTensor[kernel_dtype, C_LT, MutExternalOrigin], D: TileTensor[kernel_dtype, D_LT, MutExternalOrigin], z: TileTensor[kernel_dtype, z_LT, MutExternalOrigin], delta_bias: TileTensor[kernel_dtype, delta_bias_LT, MutExternalOrigin], ssm_states: TileTensor[kernel_dtype, ssm_states_LT, MutExternalOrigin], output: TileTensor[kernel_dtype, output_LT, MutExternalOrigin], query_start_loc: TileTensor[DType.int32, query_start_loc_LT, MutExternalOrigin], cache_indices: TileTensor[DType.int32, cache_indices_LT, MutExternalOrigin], has_initial_state: TileTensor[DType.bool, has_initial_state_LT, MutExternalOrigin], u_strides: IndexList[2], delta_strides: IndexList[2], A_strides: IndexList[2], B_strides: IndexList[3], C_strides: IndexList[3], D_strides: IndexList[1], z_strides: IndexList[2], delta_bias_strides: IndexList[1], ssm_states_strides: IndexList[3], out_strides: IndexList[2])
GPU kernel for variable-length selective scan.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!