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

PhaseStep

struct PhaseStep

One step in a phase recipe.

Specifies what to emit: either infrastructure ops (BARRIER, FENCE) or data ops matched from the body by role and predicates (EMIT).

For EMIT steps:

  • match_role: required OpRole of body op
  • match_subtile: -1 = any, else specific subtile value
  • exclude_lc: True = skip loop-carried ops (subtile == lc.selector)
  • match_lc_only: True = emit only loop-carried ops
  • match_all: True = emit ALL matching ops, False = first match only

Fields​

  • ​action (PhaseAction):
  • ​match_role (OpRole):
  • ​match_subtile (Int):
  • ​exclude_lc (Bool):
  • ​match_lc_only (Bool):
  • ​match_all (Bool):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

Methods​

emit​

static emit(role: OpRole, *, subtile: Int = -1, exclude_lc: Bool = False, match_lc_only: Bool = False, match_all: Bool = False) -> Self

Emit body ops matching the given role and predicates.

barrier​

static barrier() -> Self

Emit an s_barrier infrastructure op.

fence​

static fence() -> Self

Emit a schedule_barrier fence infrastructure op.