Skip to main content

Mojo struct

SplitKPartition

@register_passable(trivial) struct SplitKPartition[dtype: DType]

Fields

  • ptr (LegacyUnsafePointer[Scalar[SplitKPartition[dtype].accum_dtype]]):
  • num_partitions_value (UInt32):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, MHAPartitionScheme, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

accum_dtype

comptime accum_dtype = dtype

do_partition

comptime do_partition = True

Methods

__init__

__init__(ptr: LegacyUnsafePointer[Scalar[SplitKPartition[dtype].accum_dtype]], num_partitions_value: UInt32) -> Self

num_partitions

num_partitions(self) -> UInt32

Returns:

UInt32

get_exp_sum_qk_max_pointer

get_exp_sum_qk_max_pointer(self) -> LegacyUnsafePointer[Scalar[SplitKPartition[dtype].accum_dtype]]

Returns:

LegacyUnsafePointer

Was this page helpful?