Expand description
Debugging utilities for execution tracing and tensor inspection.
This module provides comprehensive debugging tools for TensorLogic execution:
- ExecutionTracer: Record execution flow through computation graphs
- TensorInspector: Examine intermediate tensor values and statistics
- BreakpointManager: Pause execution at specific nodes for inspection
- ExecutionRecorder: Record full execution history for replay and analysis
§Example
use tensorlogic_infer::debug::{ExecutionTracer, TensorInspector, BreakpointManager};
// Set up tracing
let mut tracer = ExecutionTracer::new();
tracer.enable();
// Add breakpoints
let mut breakpoints = BreakpointManager::new();
breakpoints.add_node_breakpoint(5);
// Execute with debugging
// ... execution code ...
// Analyze trace
let trace = tracer.get_trace();
for entry in trace.entries() {
println!("Node {}: {}ms", entry.node_id, entry.duration_ms());
}Structs§
- Breakpoint
Hit - Breakpoint hit information.
- Breakpoint
Manager - Manager for execution breakpoints.
- Execution
Recorder - Full execution recorder for replay and analysis.
- Execution
Report - Comprehensive execution report.
- Execution
Trace - Execution trace containing recorded operations.
- Execution
Tracer - Execution tracer for recording operation flow.
- Operation
Handle - Handle for an in-progress operation recording.
- Tensor
Inspector - Tensor inspector for examining intermediate values.
- Tensor
Stats - Tensor statistics for inspection.
- Trace
Entry - Execution trace entry recording a single operation.
- Trace
Summary - Summary statistics for an execution trace.
Enums§
- Breakpoint
- Breakpoint type for execution control.