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

ConsumerTile

struct ConsumerTile[origin: MutOrigin, ring_buffer_type: AnyStruct[RingBuffer[ring_buffer_type.dtype, ring_buffer_type.layout, ring_buffer_type.pipeline_stages, ring_buffer_type.block_rows, ring_buffer_type.block_cols, ring_buffer_type.warp_rows, ring_buffer_type.warp_cols, ring_buffer_type.reads_per_warp_block, ring_buffer_type.tile_buffers, ring_buffer_type.sync_strategy_type]], warps_computed_per_consumer: Int]

Context manager for consumer access to a single ring buffer tile.

Fields​

  • ​consumer_view_ptr (ConsumerTile[origin, ring_buffer_type, warps_computed_per_consumer].ConsumerViewPtrType):
  • ​stage (Int):
  • ​consumer_iteration (Int):
  • ​warp_tile_idx (Int):

Implemented traits​

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

comptime members​

ConsumerViewPtrType​

comptime ConsumerViewPtrType = Pointer[ConsumerView[origin, ring_buffer_type, warps_computed_per_consumer], origin]

ConsumerViewType​

comptime ConsumerViewType = ConsumerView[origin, ring_buffer_type, warps_computed_per_consumer]

Methods​

__init__​

def __init__(consumer_view_ptr: Pointer[ConsumerView[origin, ring_buffer_type, warps_computed_per_consumer], origin], stage: Int, consumer_iteration: Int, warp_tile_idx: Int) -> Self

__enter__​

def __enter__(mut self) -> ring_buffer_type.WarpTileTupleType

Acquire the tile for use.

Returns:

ring_buffer_type.WarpTileTupleType

__exit__​

def __exit__(mut self)

Release the tile back to producers.