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

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​

AnyType, ImplicitlyDeletable

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?