ExecutionTape

Interface for recording operations during execution for deferred/graph-based execution. The tape captures operations as they are performed, allowing for later replay or optimization.

Inheritors

Properties

Link copied to clipboard
abstract val isRecording: Boolean

Whether this tape is currently recording operations

Link copied to clipboard

All recorded operations on this tape

Functions

Link copied to clipboard
abstract fun clear()

Clear all recorded operations

Link copied to clipboard
abstract fun copy(): ExecutionTape

Create a copy of this tape

Link copied to clipboard
abstract fun optimize(): ExecutionTape

Optimize the recorded operations (e.g., operation fusion, dead code elimination)

Link copied to clipboard
abstract fun prune(keepOutputs: Set<String> = emptySet()): ExecutionTape

Prune unnecessary operations from the tape

Link copied to clipboard
abstract fun <T : DType, V> recordOperation(operation: Operation, inputs: List<Tensor<T, V>>, outputs: List<Tensor<T, V>>)

Record an operation on this tape

Link copied to clipboard
abstract fun <T : DType, V> replay(): List<Tensor<T, V>>

Replay all recorded operations

Link copied to clipboard
abstract fun startRecording()

Start recording operations on this tape

Link copied to clipboard
abstract fun stopRecording()

Stop recording operations on this tape