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

Mojo trait

TileConsumer

Trait for an epilogue operation which consumes a tile of data.

The kernel feeds the consumer a tile (in src_address_space); the consumer is terminal (does whatever it does and returns nothing). For a non-terminal counterpart, see TileOperation; for aux-load capabilities, see AuxLoading / AuxLoadingPipelined (which refine TileOperation, not this trait).

Implemented traits

AnyType, Copyable, Deinitable, DevicePassable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members

device_type

comptime device_type = _Self

src_address_space

comptime src_address_space

AddressSpace of the tile being consumed

Required methods

__init__

def __init__(out self, *, copy: Self)

Create a new instance of the value by copying an existing one.

Args:

  • copy (_Self): The value to copy.

Returns:

_Self

def __init__(out self, *, deinit move: Self)

Create a new instance of the value by moving the value of another.

Args:

  • move (_Self): The value to move.

Returns:

_Self

__call__

def __call__[dtype: DType, LayoutType: TensorLayout](ref self, tile_coord: Coord, tile: TileTensor[dtype, LayoutType, Storage=tile.Storage, address_space=Self.src_address_space, linear_idx_type=tile.linear_idx_type], thread_layout: Layout)

Consume tile; terminal (returns nothing).

Parameters:

  • dtype (DType): Element type of the tile.
  • LayoutType (TensorLayout): Layout of the tile.

Provided methods

get_type_name

static def get_type_name() -> String

Returns:

String

copy

def copy(self) -> Self

Explicitly construct a copy of self, a convenience method for Self(copy=self) when the type is inconvenient to write out.

Overriding this method is not allowed.

Returns:

_Self: A copy of this value.