Global execution helper that manages a TapeStack and provides simple recording scopes so NN code does not need to know about recording at all.
Returns the current tape or null if not recording
Global tape stack used for nested recording scopes
Utility to wrap a base TensorOps with a recording decorator that uses the global tape stack.
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).