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).

Fields​

  • ​action (PhaseAction): Action type for this step (EMIT, BARRIER, or FENCE).
  • ​match_role (OpRole): For EMIT steps: required OpRole of the body op to match.
  • ​match_subtile (Int): For EMIT steps: -1 = any, else a specific subtile value.
  • ​exclude_lc (Bool): For EMIT steps: skip loop-carried ops (subtile == lc.selector).
  • ​match_lc_only (Bool): For EMIT steps: emit only loop-carried ops.
  • ​match_all (Bool): For EMIT steps: emit all matching ops (True) or first match only (False).

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable

Methods​

emit​

static def 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 def barrier() -> Self

Emit an s_barrier infrastructure op.

fence​

static def fence() -> Self

Emit a schedule_barrier fence infrastructure op.