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

sparse_indexer_decode_score

def sparse_indexer_decode_score[dtype: DType, KOperand: MHAOperand, num_index_heads: Int, idx_head_dim: Int, block_size: Int](q: TileTensor[dtype, address_space=q.address_space, linear_idx_type=q.linear_idx_type, element_size=q.element_size], k_operand: KOperand, seq_lens: TileTensor[DType.uint32, address_space=seq_lens.address_space, linear_idx_type=seq_lens.linear_idx_type, element_size=seq_lens.element_size], score: TileTensor[DType.float32, address_space=score.address_space, linear_idx_type=score.linear_idx_type, element_size=score.element_size], batch: Int, max_num_blocks: Int, init_blocks: Int, local_blocks: Int, sm_scale: Float32, ctx: DeviceContext)

Launch the decode block-scoring kernel into score.

See sparse_indexer_decode for the argument contract. Exposed separately so tests can drive scoring and selection independently.