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 struct

KVCvt2MmaProducer

struct KVCvt2MmaProducer[dtype: DType, config: MLA_SM100_Decode_Config]

Produces converted BF16 KV tiles for the MMA consumer pipeline.

Parameters

  • dtype (DType): Element type of the converted KV tiles stored in SMEM.
  • config (MLA_SM100_Decode_Config): Decode config supplying num_kv_stages, BN_QK, and q_depth for pipeline stage sizing.

Fields

  • pipe (KVCvt2MmaProducer[dtype, config].PipeT):
  • smem (Pointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]):

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members

kv_stage_elems

comptime kv_stage_elems = (config * config)

PipeT

comptime PipeT = KVPipelineGeneric[config.num_kv_stages, Int(1), _resolve_warpgroup_size(), Int(2)]

Methods

__init__

def __init__(pipe: KVPipelineGeneric[config.num_kv_stages, Int(1), _resolve_warpgroup_size(), Int(2)], smem: Pointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]) -> Self

acquire

def acquire(self)

stage_index

def stage_index(self) -> UInt32

Returns:

UInt32

stage_base_ptr

def stage_base_ptr(self) -> Pointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]

Returns:

Pointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]

commit_all

def commit_all(mut self)