Skip to main content

Mojo struct

GroupedWorkContext1D1D

struct GroupedWorkContext1D1D

Context for current work tile, used with context manager pattern.

Provides access to work tile info and expert scale factor.

Fields

  • info (GroupedWorkInfo1D1D):
  • expert_scale (Float32):
  • m_end (UInt32):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

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

m

m(self) -> UInt32

M coordinate in contiguous token space.

Returns:

UInt32

n

n(self) -> UInt32

N coordinate in output space.

Returns:

UInt32

group_idx

group_idx(self) -> UInt32

Index into active experts list.

Returns:

UInt32

expert_id

expert_id(self) -> Int32

Expert ID for B tensor indexing.

Returns:

Int32

is_valid

is_valid(self) -> Bool

Whether this tile has valid work.

Returns:

Bool

Was this page helpful?