Skip to main content

Mojo struct

KVLoad2CvtProducer

@register_passable(trivial) struct KVLoad2CvtProducer[dtype: DType, config: MLA_SM100_Decode_Config]

Fields

  • pipe (KVLoad2CvtProducer[dtype, config].KVPipeType):
  • smem_upper_fp8 (UnsafePointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, TrivialRegisterType

comptime members

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

bf16_stage_elems

comptime bf16_stage_elems = (config * config)

fp8_stage_stride_elems

comptime fp8_stage_stride_elems = (2 * KVLoad2CvtProducer[dtype, config].bf16_stage_elems)

KVPipeType

comptime KVPipeType = KVPipelineGeneric[config.num_kv_stages, 1, 1, (WARPGROUP_SIZE + 2)]

Methods

__init__

__init__(pipe: KVPipelineGeneric[config.num_kv_stages, 1, 1, (WARPGROUP_SIZE + 2)], smem_upper_fp8: UnsafePointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]) -> Self

init

init(self)

stage_base_ptr

stage_base_ptr[*, qk_stage: Int = 0](self) -> UnsafePointer[Scalar[dtype], MutAnyOrigin, address_space=AddressSpace.SHARED]

Returns:

UnsafePointer

producer_mbar

producer_mbar[*, qk_stage: Int = 0](self) -> MBarType

Returns:

MBarType

acquire

acquire[*, qk_stage: Int = 0](self)

commit_step

commit_step(mut self)

Was this page helpful?