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

short_conv_ring_commit_kv

def short_conv_ring_commit_kv[dtype: DType, ring_dtype: DType, //, target: StringSpan[ImmStaticOrigin], k_col: Int](qkvr: TileTensor[dtype, Engine=qkvr.Engine, address_space=qkvr.address_space, linear_idx_type=qkvr.linear_idx_type], k_ring: TileTensor[ring_dtype, Engine=k_ring.Engine, address_space=k_ring.address_space, linear_idx_type=k_ring.linear_idx_type], v_ring: TileTensor[ring_dtype, Engine=v_ring.Engine, address_space=v_ring.address_space, linear_idx_type=v_ring.linear_idx_type], input_row_offsets: TileTensor[.uint32, Engine=input_row_offsets.Engine, address_space=input_row_offsets.address_space, linear_idx_type=input_row_offsets.linear_idx_type], positions: TileTensor[.uint32, Engine=positions.Engine, address_space=positions.address_space, linear_idx_type=positions.linear_idx_type], k_conv_row: TileTensor[.uint32, Engine=k_conv_row.Engine, address_space=k_conv_row.address_space, linear_idx_type=k_conv_row.linear_idx_type], v_conv_row: TileTensor[.uint32, Engine=v_conv_row.Engine, address_space=v_conv_row.address_space, linear_idx_type=v_conv_row.linear_idx_type], context: DeviceContext)

Commits the K and V conv inputs of an attention block in one launch.

K channels start at column k_col of qkvr and V channels follow them. Grid z picks the site.

Was this page helpful?