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
Executor
Executor
class max.experimental.executor.Executor(*args, **kwargs)
Bases: Protocol
Contract for running a finalized eager graph against input buffers.
execute()
execute(graph, inputs)
Execute graph with inputs and return output buffers.
-
Parameters:
-
- graph (Graph) – A finalized graph ready for execution. The executor may mutate the module internally (for example, to apply lowering passes); callers must not use the module after this call returns.
- inputs (Sequence[Buffer]) – Buffers corresponding to
graph.inputs, in order. MutableBufferTypeinputs are mutated in place; the returned sequence covers declared graph outputs only.
-
Returns:
-
Output buffers in the order declared by
graph.output. -
Raises:
-
UnsupportedGraphError – If the executor statically refuses the graph before any execution begins.
-
Return type: