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_state
def ssd_chunk_state[kernel_dtype: DType, SLT: TensorLayout, SEngine: 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, DSTATE: Int](slots_i: Int32, nheads_i: Int32, head_dim_i: Int32, ngroups_i: Int32, info: TileTensor[.int32, SLT, MutUntrackedOrigin, Engine=SEngine], cs: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], delta_in: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], states: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], x_fn: XFn, b_fn: BFn)
Computes the state each chunk contributes by itself, on tensor cores.
states[slot, h, p, n] = sum_t exp2(cs_last - cs_t) dt_t x[t, p] B[t, n].
Grid (slots, nheads, head_dim / TILE), block OUT_THREADS (4 warps, 16
rows of p each). The reduction runs over t in tiles of 64 tokens that
stay [t][p] and [t][n] in shared memory: ldmatrix.trans turns them
into the MMA fragments.