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

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],
    ]

    def 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​

BarrierArray​

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

Methods​

create_pipeline​

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

Create runtime pipeline from this storage.

Returns:

ProducerConsumerPipeline[num_stages]

barrier_ptr​

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

Escape hatch: Get raw barrier pointer for custom initialization.

Returns:

MbarPtr