Execution

Global execution helper that manages a TapeStack and provides simple recording scopes so NN code does not need to know about recording at all.

Properties

Link copied to clipboard

Returns the current tape or null if not recording

Link copied to clipboard

Global tape stack used for nested recording scopes

Functions

Link copied to clipboard

Utility to wrap a base TensorOps with a recording decorator that uses the global tape stack.

Link copied to clipboard
fun withTape(block: () -> Unit): ExecutionTape

Execute the given block with a fresh tape pushed on the stack and recording enabled. The tape is returned after the block finishes (even if it throws).