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 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,
DevicePassable,
ImplicitlyCopyable,
ImplicitlyDeletable,
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β
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.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!