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 class
InterpreterExecutor
InterpreterExecutor
class max.experimental.executor.InterpreterExecutor(max_ops=None)
Bases: object
Executes a graph via max._interpreter.execute().
Raises UnsupportedGraphError when
max._interpreter.can_execute() refuses the graph up front: a
custom op that mutates an operand buffer in place, a custom op with no
CustomOp declaration, an unregistered op, or too many ops. It also
raises it when an op’s device or dtypes turn out, at dispatch, to be
outside its family’s supported set. Other runtime errors propagate — including a custom op whose realized output
disagrees with its staged type, which is a kernel contract violation
rather than a refusal. An explicit interpreter request is deliberately
loud.
Initializes the executor.
-
Parameters:
-
max_ops (int | None) – Maximum number of dispatchable ops accepted. Graphs with more ops raise
UnsupportedGraphError.Noneimposes no limit.
execute()
execute(graph, inputs)
Executes graph via the MO interpreter.