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

ScheduleCompiler

struct ScheduleCompiler

Generic pipeline schedule compiler.

Orchestrates schedule construction by calling PipelineSchedule trait methods in order. All kernel-specific logic lives in trait implementations. All intermediate state is List β€” sizes are discovered, not prescribed.

Usage: var sc = ScheduleCompiler() sc.compile(SingleBufferScheduleT) # Read phases via comptime for over sc.prologue, sc.kernel, sc.epilogue

Fields​

  • ​config (PipelineConfig):
  • ​body (List[OpDesc]):
  • ​edges (List[DepEdge]):
  • ​prologue (List[ScheduleEntry]):
  • ​kernel (List[ScheduleEntry]):
  • ​epilogue (List[ScheduleEntry]):
  • ​kernel_deps (List[DepEdge]):
  • ​warp_stagger_index (Int):
  • ​lgkm_per_load_a (Int):
  • ​lgkm_per_load_b (Int):

Implemented traits​

AnyType, ImplicitlyDestructible, Movable

Methods​

__init__​

__init__(out self)

compile​

compile[S: PipelineSchedule](mut self, schedule: S)

Full pipeline compilation from a schedule definition.

The framework owns all phase derivation:

  • Single-buffer (depth<2): default functions + transform_kernel hook
  • Double-buffer (depth>=2): PipelineProgram β†’ derive phases from blocks