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 module
debug
Diagnostic tooling for compiled pipeline schedules.
Compiled schedules are comptime values (List[ScheduleEntry]), and
List is not ImplicitlyCopyable, so the only way to walk the entries
in a printer is via a comptime for i in range(N) loop with
materialize[entries[i]]() per access. The helpers below provide the
ingredients for that pattern; callers wire up the comptime loops.
Usage pattern:
comptime n_krn = len(schedule.kernel)
print_phase_header("KERNEL", n_krn)
comptime for i in range(n_krn):
print_entry[my_op_name_fn]("KRN", i, materialize[schedule.kernel[i]]())
var counts = WaitCounts()
comptime for i in range(n_krn):
counts.add(materialize[schedule.kernel[i]](), i, n_krn)
print_wait_counts("kernel ", counts)Structsβ
- β
WaitCounts: Per-phase wait/barrier counts, populated by repeatedaddcalls.
Functionsβ
- β
default_op_name: Returns the default name for a framework op tag. - β
print_entry: Prints oneScheduleEntryon a single line, with the caller's pre-resolved tag name. - β
print_phase_header: Prints a phase section header with separator rule. - β
print_wait_counts: Prints a one-line summary of aWaitCountsvalue. - β
update_wait_counts: Updates counts for one entry;next_tagis the next entry's tag (or_Ops.NONE.valuefor the last entry).
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!