Skip to main content

Python function

realization_context

realization_context()

max.experimental.tensor.realization_context(ctx)

source

Sets the current realization context, within a context manager.

New tensors created within this block will use the given realization context to execute.

See RealizationContext.

Parameters:

ctx (RealizationContext) – The realization context to set as the current context.

Returns:

A context manager. When the context manager is entered, it will set ctx as the current realization context. When exited the current realization context will be reset to its previous value.

Return type:

AbstractContextManager[RealizationContext]