IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

ssd_combined_gpu

ssd_combined_gpu[kernel_dtype: DType, DSTATE: Int, output_layout: Layout, x_layout: Layout, out_z_layout: Layout, residual_layout: Layout, u_layout: Layout, delta_layout: Layout, A_layout: Layout, B_layout: Layout, C_layout: Layout, D_layout: Layout, z_layout: Layout, delta_bias_layout: Layout, gamma_layout: Layout](total_batch_dim: Int, batch: Int, dim: Int, seqlen: Int, group_size: Int, delta_softplus: Int8, output: LayoutTensor[kernel_dtype, output_layout, MutAnyOrigin], x: LayoutTensor[kernel_dtype, x_layout, MutAnyOrigin], out_z: LayoutTensor[kernel_dtype, out_z_layout, MutAnyOrigin], residual: LayoutTensor[kernel_dtype, residual_layout, MutAnyOrigin], u: LayoutTensor[kernel_dtype, u_layout, MutAnyOrigin], delta: LayoutTensor[kernel_dtype, delta_layout, MutAnyOrigin], A: LayoutTensor[kernel_dtype, A_layout, MutAnyOrigin], B: LayoutTensor[kernel_dtype, B_layout, MutAnyOrigin], C: LayoutTensor[kernel_dtype, C_layout, MutAnyOrigin], D: LayoutTensor[kernel_dtype, D_layout, MutAnyOrigin], z: LayoutTensor[kernel_dtype, z_layout, MutAnyOrigin], delta_bias: LayoutTensor[kernel_dtype, delta_bias_layout, MutAnyOrigin], gamma: LayoutTensor[kernel_dtype, gamma_layout, MutAnyOrigin], epsilon: Scalar[kernel_dtype], weight_offset: Scalar[kernel_dtype])

GPU kernel for SSD combined operation.

Combines selective scan with normalization and residual connection. Performs: norm(residual + selective_scan(input))