IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python module

max.experimental.executor

Executor protocol and concrete implementations for eager graph execution.

An Executor receives a finalized Graph and a sequence of input Buffer objects and returns output buffers. Callers must not rely on the graph module being unmodified after execute returns.

Selection order (highest to lowest priority):

  1. Constructor injection into EagerRealizationContext.
  2. set_default_executor() / default_executor().
  3. MAX_EAGER_EXECUTOR environment variable (composite | jit | interpreter | compile; default composite).

Executorsโ€‹

CompilingExecutorCompiles and executes a graph synchronously via session.load.
ExecutorContract for running a finalized eager graph against input buffers.
InterpreterExecutorExecutes a graph via max._interpreter.execute().
JitExecutorExecutes via the interpreter while compiling in the background.
CompositeExecutorAlias for JitExecutor.

Default executorโ€‹

default_executorReturns the ambient default executor.
set_default_executorSets the ambient default executor.

Exceptionsโ€‹

UnsupportedGraphErrorRaised by an executor that refuses to execute a graph.