IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo struct

NoPartition

struct NoPartition[dtype: DType]

A single-partition (non-split-K) scheme for MHA decoding.

Uses the standard single-pass flash-attention decode without any inter-CTA reduction. do_partition is False, so the split-K reduction kernel is compiled away entirely.

Parameters​

  • ​dtype (DType): The accumulator element type (same as the output type).

Implemented traits​

AnyType, Copyable, Defaultable, ImplicitlyCopyable, ImplicitlyDeletable, MHAPartitionScheme, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

accum_dtype​

comptime accum_dtype = dtype

do_partition​

comptime do_partition = False

Methods​

__init__​

def __init__() -> Self

num_partitions​

def num_partitions(self) -> UInt32

Returns:

UInt32

max_num_partitions​

def max_num_partitions(self) -> UInt32

Returns:

UInt32

get_exp_sum_qk_max_pointer​

def get_exp_sum_qk_max_pointer(self) -> Pointer[Scalar[Self.accum_dtype], MutAnyOrigin, _safe=False]

Returns:

Pointer[Scalar[Self.accum_dtype], MutAnyOrigin, _safe=False]

Was this page helpful?