Mojo struct
Producer
@register_passable(trivial)
struct Producer[origin: MutOrigin, a_type: DType, b_type: DType, a_tile_layout: Layout, b_tile_layout: Layout, num_pipeline_stages: Int, num_group_stages: Int, k_group_size: Int]
Producer view with get_tiles() API.
Fields
- ring_buffer_ptr (
Pointer[Producer[origin, a_type, b_type, a_tile_layout, b_tile_layout, num_pipeline_stages, num_group_stages, k_group_size].RingBufferType, origin]):
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
Movable,
UnknownDestructibility
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
RingBufferType
comptime RingBufferType = RingBuffer[a_type, b_type, a_tile_layout, b_tile_layout, num_pipeline_stages, num_group_stages, k_group_size]
Methods
__enter__
__enter__(mut self) -> Self
__exit__
__exit__(mut self)
drain
drain(mut self)
Drain all pending pipeline stages.
Prevents the CTA from exiting while a peer CTA is still working on MMA. Waits for each consumer slot and releases it, cycling through all num_group_stages stages.
get_tiles
get_tiles(mut self) -> ProducerTiles[origin, a_type, b_type, a_tile_layout, b_tile_layout, num_pipeline_stages, num_group_stages, k_group_size]
Get the next available slot with stage, barrier, and tile arrays.
Synchronization is handled internally - waits for slot availability.
Returns:
ProducerTiles
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!