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

WorkInfo

struct WorkInfo

Describes a unit of split-K work for a single output tile.

Holds the output-tile coordinates (m, n), the starting K index and number of K tiles this split covers, and whether the tile is in bounds.

Fields​

  • ​m (UInt32):
  • ​n (UInt32):
  • ​k_start (UInt32):
  • ​num_k_tiles (UInt32):
  • ​is_valid_tile (Bool):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members​

INVALID_WORK_INFO​

comptime INVALID_WORK_INFO = WorkInfo(UInt32(0), UInt32(0), UInt32(0), UInt32(0), False)

Methods​

is_valid​

def is_valid(self) -> Bool

Returns whether this work tile is in bounds.

Returns:

Bool

is_final_split​

def is_final_split(self, k_tiles_per_output_tile: UInt32) -> Bool

Returns whether this split covers the final K tiles of the output tile.

Args:

  • ​k_tiles_per_output_tile (UInt32): Total number of K tiles for the output tile.

Returns:

Bool

write_to​

def write_to(self, mut writer: T)

Writes a parenthesized summary of this work info to the given writer.

Args:

  • ​writer (T): Sink the parenthesized (m, n, k_start, is_valid_tile) summary is written to.

Was this page helpful?