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 function

verify_schedule

verify_schedule(program: PipelineProgram, config: PipelineConfig, lgkm_per_a: Int, lgkm_per_b: Int, wait_lgkm_first: Int, wait_vm_last: Int)

Verify structural invariants of a finalized pipeline schedule.

Runs at compile time — zero runtime cost. Catches bugs in schedule construction that would otherwise surface as silent GPU miscomputes.

Checks:

  1. Block completeness: every block has exactly 1 MMA op
  2. Wait count bounds: wait values are non-negative and bounded
  3. Distribution invariant: uniform global loads when max_globals > 0
  4. Stage consistency: fragment/global ops use correct stage for half
  5. Prefetch coverage: at least one global is marked prefetch
  6. Completion coverage: each half has a completion load
  7. Warp stagger LDS safety: no cross-block prefetch/fragment race

Note: these are structural checks on the generated program. They do not verify that the execution ordering respects all LDG dependency edges — that is enforced by the scheduler (greedy_schedule / optimal_schedule) which only places ops whose d=0 predecessors are already scheduled.