Skip to main content

candle_graph/
lib.rs

1//! Static structure and dataflow analysis for candle-rs models.
2//!
3//! See `README.md` for the motivation. In short: candle's autograd graph is not inspectable at
4//! runtime (`Tensor::op()` is `pub(crate)`), and several candle-nn ops sever gradient flow
5//! silently, so the only way to answer "does this parameter receive a gradient" is to read the
6//! source.
7//!
8//! It reconstructs module and parameter structure, expression-level dtype and gradient dataflow,
9//! deterministic CI baselines, and a standalone interactive report.
10
11pub mod analysis_cache;
12pub mod baseline;
13pub mod cargo_context;
14pub mod cli;
15pub mod contracts;
16pub mod dataflow;
17pub mod diagnostics;
18pub mod discover;
19pub mod extract;
20pub mod ir;
21pub mod known;
22pub mod load;
23pub mod model_baseline;
24pub mod model_ir;
25pub mod op_semantics;
26pub mod query;
27pub mod report;
28pub mod runtime;
29pub mod verify;
30pub mod viewer;
31
32pub use extract::Extractor;
33pub use ir::Structure;