DefaultGraphExecutionContext
class DefaultGraphExecutionContext(val baseOps: TensorOps = VoidTensorOps(), val phase: Phase = Phase.EVAL, val tensorDataFactory: TensorDataFactory = DenseTensorDataFactory(), val hooks: ForwardHooks? = null, val memoryInfo: MemoryInfo = MemoryInfo.getEmptyInfo(), val executionStats: ExecutionStats = ExecutionStats(), val createTapeFactory: (GraphExecutionContext) -> ExecutionTape = { _ -> DefaultExecutionTape() }, val computeGraph: ComputeGraph? = null, baseSink: OpSink = NoOpSink) : GraphExecutionContext(source)
Constructors
Link copied to clipboard
constructor(baseOps: TensorOps = VoidTensorOps(), phase: Phase = Phase.EVAL, tensorDataFactory: TensorDataFactory = DenseTensorDataFactory(), hooks: ForwardHooks? = null, memoryInfo: MemoryInfo = MemoryInfo.getEmptyInfo(), executionStats: ExecutionStats = ExecutionStats(), createTapeFactory: (GraphExecutionContext) -> ExecutionTape = { _ -> DefaultExecutionTape() }, computeGraph: ComputeGraph? = null, baseSink: OpSink = NoOpSink)
Properties
Link copied to clipboard
Optional compute graph used by GraphSink presets.
Link copied to clipboard
Link copied to clipboard
Current execution tape (null if not recording)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Clear cached tensor references from the trace session. Call between training batches to prevent memory accumulation.
Link copied to clipboard
Force garbage collection
Link copied to clipboard
Convenience helper to record within a block and return the produced tape (and keep existing graph).
Link copied to clipboard
Reset execution statistics
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Helper for internal use that returns the tape