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 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 repeated add calls.

Functions​