Skip to main content

Mojo struct

GroupedWorkInfo1D1D

@register_passable(trivial) struct GroupedWorkInfo1D1D

Work tile information for 1D-1D grouped matmul.

Contains the coordinates and metadata for a single work tile:

  • m, n: Output tile coordinates (m is in contiguous token space)
  • group_idx: Index into active experts (for a_offsets indexing)
  • expert_id: The actual expert ID for B tensor lookup
  • is_valid_tile: Whether this tile contains valid work
  • terminate: Whether the scheduler has no more work

Fields

  • m (UInt32):
  • n (UInt32):
  • group_idx (UInt32):
  • expert_id (Int32):
  • is_valid_tile (Bool):
  • terminate (Bool):

Implemented traits

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

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__() -> Self

is_valid

is_valid(self) -> Bool

Returns True if this work tile has valid work to do.

Returns:

Bool

is_done

is_done(self) -> Bool

Returns True if the scheduler has no more work.

Returns:

Bool

__str__

__str__(self) -> String

Returns:

String

write_to

write_to(self, mut writer: T)

Was this page helpful?