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
Lamport
struct Lamport
Sizing and state-block layout for the barrier-free Lamport comm region.
The single source of truth these values derive from: Signal (sync.mojo)
sizes its embedded region from here, and the kernel reads the pack/state
layout from here, instead of restating the arithmetic at each site. Holds
only what is independent of Signal and MAX_GPUS (so lamport.mojo keeps
no dependency on sync.mojo); Signal composes the full region size from
MAX_SMALL_MESSAGE_BYTES x MAX_GPUS x LamportGeneration.NUM_GENERATIONS.
Implemented traitsβ
comptime membersβ
ATOMIC_BYTESβ
comptime ATOMIC_BYTES = 16
The 128-bit single-copy-atomic pack width the sentinel protocol needs.
MAX_PACKSβ
comptime MAX_PACKS = 65536
MAX_SMALL_MESSAGE_BYTES in 128-bit packs; the per-slot generation stride.
MAX_SMALL_MESSAGE_BYTESβ
comptime MAX_SMALL_MESSAGE_BYTES = 1048576
Largest per-rank message a Lamport generation slot reserves for (bytes) -- the small/large dispatch ceiling. 1 MiB is the measured B200 crossover.
STATE_ARRIVALβ
comptime STATE_ARRIVAL = 2
STATE_FLAGβ
comptime STATE_FLAG = 0
STATE_LENβ
comptime STATE_LEN = 4
STATE_PREV_ELEMSβ
comptime STATE_PREV_ELEMS = 1
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!