IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo function

ssd_chunk_output

def ssd_chunk_output[kernel_dtype: DType, SLT: TensorLayout, SEngine: TensorEngine, A_LT: TensorLayout, D_LT: TensorLayout, dt_bias_LT: TensorLayout, y_LT: TensorLayout, Engine: TensorEngine, XFn: def[width: Int, alignment: Int](Int, Int, Int) -> SIMD[kernel_dtype, width] & RegisterPassable & ImplicitlyCopyable, BFn: def[width: Int, alignment: Int](Int, Int, Int) -> SIMD[kernel_dtype, width] & RegisterPassable & ImplicitlyCopyable, CFn: def[width: Int, alignment: Int](Int, Int, Int) -> SIMD[kernel_dtype, width] & RegisterPassable & ImplicitlyCopyable, DSTATE: Int, use_grouped_cb: Bool = False](slots_i: Int32, nheads_i: Int32, head_dim_i: Int32, ngroups_i: Int32, D: TileTensor[kernel_dtype, D_LT, ImmUntrackedOrigin, Engine=Engine], y: TileTensor[kernel_dtype, y_LT, MutUntrackedOrigin, Engine=Engine], info: TileTensor[.int32, SLT, MutUntrackedOrigin, Engine=SEngine], cs: TileTensor[.float32, SLT, ImmUntrackedOrigin, Engine=SEngine], delta_in: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], states: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], cb_in: TileTensor[.float32, SLT, ImmUntrackedOrigin, Engine=SEngine], x_fn: XFn, b_fn: BFn, c_fn: CFn)

Computes y of one 64-row tile of a chunk for one head on tensor cores.

Grid (slots, nheads, (CHUNK / TILE) * head_dim / TILE), block OUT_THREADS (4 warps, 16 rows of the tile each). Operands are bf16 and accumulation is fp32 (m16n8k16). Each warp keeps its C fragments in registers: the carry-in term C S'^T and, per 16 columns, C B^T are MMAs, the decay mask is applied to the accumulator fragment, which is already the A-operand layout of the next MMA M X.

Was this page helpful?