Skip to main content

Module debug

Module debug 

Source
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§

BreakpointHit
Breakpoint hit information.
BreakpointManager
Manager for execution breakpoints.
ExecutionRecorder
Full execution recorder for replay and analysis.
ExecutionReport
Comprehensive execution report.
ExecutionTrace
Execution trace containing recorded operations.
ExecutionTracer
Execution tracer for recording operation flow.
OperationHandle
Handle for an in-progress operation recording.
TensorInspector
Tensor inspector for examining intermediate values.
TensorStats
Tensor statistics for inspection.
TraceEntry
Execution trace entry recording a single operation.
TraceSummary
Summary statistics for an execution trace.

Enums§

Breakpoint
Breakpoint type for execution control.