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

TMABarrierHandler

struct TMABarrierHandler[expected_bytes: Int]

TMA barrier handler: sets expected bytes on prepare, noop on complete.

Initializes the pipeline on construction (phase=0, barrier counts).

Parameters​

  • ​expected_bytes (Int): Total bytes expected per stage across all loaders.

Implemented traits​

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

Methods​

__init__​

def __init__[num_stages: Int](mut pipeline: ProducerConsumerPipeline[num_stages], num_consumers: Int, cluster_size: Int) -> Self

prepare_stage​

def prepare_stage(self, mem_barrier: UnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED])

complete_stage​

def complete_stage(self, mem_barrier: UnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED])