Skip to main content

Mojo struct

ProducerTile

@register_passable(trivial) struct ProducerTile[dtype: DType, layout: Layout, pipeline_stages: Int, block_rows: Int, block_cols: Int, warp_rows: Int, warp_cols: Int, reads_per_warp_block: Int, tile_buffers: Int, sync_strategy_type: SyncStrategy, //, origin: MutOrigin, ring_buffer_type: AnyStruct[RingBuffer[dtype, layout, pipeline_stages, block_rows, block_cols, warp_rows, warp_cols, reads_per_warp_block, tile_buffers, sync_strategy_type]], warps_processed_per_producer: Int]

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

Fields

  • producer_view_ptr (ProducerTile[origin, ring_buffer_type, warps_processed_per_producer].ProducerViewPtrType):
  • stage (Int):
  • producer_iteration (Int):
  • warp_tile_idx (Int):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

ProducerViewPtrType

comptime ProducerViewPtrType = Pointer[ProducerTile[origin, ring_buffer_type, warps_processed_per_producer].ProducerViewType, origin]

ProducerViewType

comptime ProducerViewType = ProducerView[origin, ring_buffer_type, warps_processed_per_producer]

Methods

__init__

__init__(producer_view_ptr: Pointer[ProducerTile[origin, ring_buffer_type, warps_processed_per_producer].ProducerViewType, origin], stage: Int, producer_iteration: Int, warp_tile_idx: Int) -> Self

__enter__

__enter__(mut self) -> ring_buffer_type.WarpTileTupleType

Acquire the tile for use.

Returns:

ring_buffer_type.WarpTileTupleType

__exit__

__exit__(mut self)

Release the tile back to consumers.

Was this page helpful?