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, decoding_warp_split_k: Bool = False]

Fields

  • seq_len (Int):
  • max_seq_len (Int):
  • num_keys (Int):
  • q_row_offset (Int):
  • out_row_offset (Int):
  • split_idx (Int):
  • batch_idx (Int):
  • kv_start_row (Int):
  • num_keys_this_split (Int):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable

comptime members

__copy_ctor_is_trivial

comptime __copy_ctor_is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__move_ctor_is_trivial

comptime __move_ctor_is_trivial = True

Methods

__init__

__init__(k: KVLUTType, valid_length: UnsafePointer[Scalar[ValidLengthType.dtype], ImmutAnyOrigin], max_seq_len: Int, num_partitions: Int, batch_size: 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?