Skip to main content

Mojo struct

OffsetPosition

@register_passable(trivial) struct OffsetPosition[config: MLA_SM100_Decode_Config, KVLUTType: MHAOperand, ragged: Bool, is_cache_length_accurate: Bool, ValidLengthType: OptionalPointer]

Fields

  • seq_len (Int):
  • num_keys (Int):
  • q_out_row_offset (Int):

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

Methods

__init__

__init__(k: KVLUTType, valid_length: UnsafePointer[Scalar[ValidLengthType.dtype], ImmutAnyOrigin], max_seq_len: Int) -> Self

cache_len

cache_len(self) -> Int

Returns:

Int

start_pos

start_pos(self, cache_start_pos: UInt32) -> UInt32

Returns:

UInt32

Was this page helpful?