Skip to main content

Mojo struct

InputPipelineStorage

struct InputPipelineStorage[num_stages: Int, Payload: TilePayload]

Unified storage for input tile pipeline (barriers + payload).

Bundles barrier storage with tile payload storage, ensuring they're always consistent. The pipeline can only be created from matching storage.

Example:

struct MySmem[...]:
    var input: InputPipelineStorage[
        4,  # 4 stages
        StandardTilePayload[float16, float16, a_layout, b_layout],
    ]

    fn get_pipeline(ref[SHARED] self):
        return self.input.create_pipeline()

Parameters

  • num_stages (Int): Number of pipeline stages.
  • Payload (TilePayload): Tile payload type (defines what's in each stage).

Fields

  • barriers (BarrierPair[num_stages]):

Implemented traits

AnyType, ImplicitlyDestructible

comptime members

__del__is_trivial

comptime __del__is_trivial = True

BarrierArray

comptime BarrierArray = SMemArray[SharedMemBarrier, (num_stages * 2)]

Methods

create_pipeline

create_pipeline(ref[AddressSpace._value._mlir_value] self) -> ProducerConsumerPipeline[num_stages]

Create runtime pipeline from this storage.

Returns:

ProducerConsumerPipeline

barrier_ptr

barrier_ptr(ref[AddressSpace._value._mlir_value] self) -> MbarPtr

Escape hatch: Get raw barrier pointer for custom initialization.

Returns:

MbarPtr

Was this page helpful?