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
PipelineProgram
struct PipelineProgram
A pipeline schedule phase as a sequence of MMA block specifications.
Separates schedule definition (what blocks to emit) from schedule expansion (writing ScheduleEntry values into a List). This makes schedules declarative data rather than imperative code.
Per-block emission has two paths:
- Default: each
MMABlockSpecis expanded via the flag-driven template inMMABlockSpec.expand_to_list. The*_strategyflags onScheduleConfigcontrol op order, barrier placement, wrap fences, etc. - Override: schedules can supply a parallel
explicit_blockslist (oneList[OpDesc]per block) that bypasses the template entirely. Whenexplicit_blocks[i]is non-empty the framework emits those ops verbatim β gives schedules full control over per-block emission shape without needing new flags.
explicit_blocks defaults to empty (every block uses the
template). Schedules opt in by overriding build_explicit_blocks
on the PipelineSchedule trait.
Fieldsβ
- βblocks (
List[MMABlockSpec]): - βexplicit_blocks (
List[List[OpDesc]]): Per-block override op lists. Empty entries fall back to the template; non-empty entries are emitted verbatim. Defaults to empty so every block uses the template. - βtrailing_barrier (
Bool):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyDestructible,
Movable
Methodsβ
__init__β
__init__(out self, num_blocks: Int = 0, *, trailing_barrier: Bool = False)
total_entriesβ
block_startβ
block_start(self, block_idx: Int) -> Int
Return the starting entry index for the given block.
Returns:
mma_entryβ
mma_entry(self, block_idx: Int) -> Int
Return the entry index of the MMA op in the given block.
For explicit-override blocks: scans the op list for the first
COMPUTE-role op. For template blocks: uses mma_position.
Returns:
expand_to_listβ
expand_to_list(self, phase: Phase) -> List[ScheduleEntry]
Expand all blocks into a List of schedule entries.
For each block: emit explicit_blocks[i] verbatim if non-empty,
otherwise call the block's flag-driven expand_to_list.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!