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_cumsum

def ssd_chunk_cumsum[kernel_dtype: DType, A_LT: TensorLayout, D_LT: TensorLayout, dt_bias_LT: TensorLayout, Engine: TensorEngine, SLT: TensorLayout, SEngine: TensorEngine, DtFn: def[width: Int, alignment: Int](Int, Int) -> SIMD[kernel_dtype, width] & RegisterPassable & ImplicitlyCopyable, dt_softplus: Bool](slots_i: Int32, A: TileTensor[kernel_dtype, A_LT, ImmUntrackedOrigin, Engine=Engine], D: TileTensor[kernel_dtype, D_LT, ImmUntrackedOrigin, Engine=Engine], dt_bias: TileTensor[kernel_dtype, dt_bias_LT, ImmUntrackedOrigin, Engine=Engine], info: TileTensor[.int32, SLT, MutUntrackedOrigin, Engine=SEngine], cs: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], delta_out: TileTensor[.float32, SLT, MutUntrackedOrigin, Engine=SEngine], dt_fn: DtFn)

Writes dt and the inclusive cumulative log2 decay of every chunk.

Grid (slots, nheads), block CHUNK threads, one token each.

Was this page helpful?