Skip to main content

Crate candle_graph

Crate candle_graph 

Source
Expand description

Static structure and dataflow analysis for candle-rs models.

See README.md and docs/features.md for the feature split:

  • static (default): agent-oriented IR, bounded queries, dtype/gradient dataflow
  • runtime: merge v3 profile traces; operation timings (avg/min/max) and gradient audit
  • visualizer: standalone model.html for human exploration

Re-exports§

pub use phase::ExecutionPhase;

Modules§

analysis_cache
Optional on-disk cache for analyzed crate::model_ir::ModelIr documents.
cargo_context
Bounded Cargo/config discovery for analyzing a crate in its real feature/cfg context.
cli
Shared CLI engine for candle-graph and cargo-candle-graph.
contracts
Conservative tensor-contract inference from qualified Rust functions.
dataflow
Expression-level dataflow, dtype, and gradient-connectivity analysis.
diagnostics
Rustc-like diagnostics rendered from unified model findings.
discover
Crate-wide model discovery and unified IR assembly.
dtype_propagate
Fixpoint dtype propagation over the unified model IR operation graph.
extract
The structure extraction pass.
ir
The analysis IR.
known
Ground truth for the candle-nn constructors that register parameters.
load
Crate loading and the symbol table.
model_baseline
Deterministic ModelIr fingerprints for crate-wide CI checks.
model_ir
Unified, agent-oriented representation of a Candle model crate.
op_semantics
Transfer rules for candle Tensor ops and known candle-nn helpers.
phase
Train vs inference execution phase for static graphs and runtime traces.
profile
Runtime profiler: attach during train or inference to emit timed operation/edge traces.
query
Bounded queries over crate::model_ir::ModelIr.
runtime
Bounded runtime evidence and gradient-audit protocol.
verify
Cross-check the static parameter set against a real checkpoint.
viewer
Dependency-free interactive HTML visualizer for candle-graph/viewer/1 payloads.
viewer_projection
Project ModelIr into candle-graph/viewer/1 for the interactive HTML visualizer.