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

derive_epilogue_from_program

derive_epilogue_from_program(program: PipelineProgram, config: PipelineConfig) -> List[ScheduleEntry]

Auto-derive epilogue from a kernel program.

Generic transformation for double-buffer schedules:

  1. Strip prefetch global loads from each block
  2. Add wait_vm(0) drain starting at the first stripped block per half
  3. Fuse adjacent blocks where the second has no pre-ops or loads
  4. Append trailing s_barrier

Returns:

List[ScheduleEntry]