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 function

set_default_executor

set_default_executor()​

max.experimental.executor.set_default_executor(executor)

source

Sets the ambient default executor.

The set takes effect immediately. The returned SetterContext may be used as a context manager to restore the previous executor on exit, or discarded to keep the new one.

Parameters:

executor (Executor) – The new default executor. All subsequently constructed EagerRealizationContext instances that receive executor=None will use this executor.

Returns:

An undo handle restoring the previously installed executor.

Return type:

SetterContext[Executor]