Skip to main content

Mojo struct

LoadOrderBarrierStorage

struct LoadOrderBarrierStorage

Storage for load order barrier (mainloop → epilogue load coordination).

This single barrier coordinates the mainloop load warp with the epilogue load warp, ensuring the epilogue load doesn't start before the mainloop has issued its prologue TMA operations.

Protocol:

  1. Mainloop load warp issues prologue loads
  2. Mainloop load warp calls arrive() on this barrier
  3. Epilogue load warp waits on this barrier before starting

This prevents TMA resource contention between mainloop and epilogue loads.

Fields

  • barrier_storage (LoadOrderBarrierStorage.BarrierArray.Storage):

Implemented traits

AnyType, ImplicitlyDestructible

comptime members

__del__is_trivial

comptime __del__is_trivial = True

BarrierArray

comptime BarrierArray = SMemArray[SharedMemBarrier, 1]

Methods

barrier

barrier(ref[AddressSpace._value._mlir_value] self) -> LoadOrderBarrierStorage.BarrierArray

Get the load order barrier.

Returns:

LoadOrderBarrierStorage.BarrierArray

ptr

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

Get raw barrier pointer for initialization.

Returns:

MbarPtr

Was this page helpful?