Skip to main content

candle_graph/
lib.rs

1//! TensorFlow Profiler-style execution graphs for [Candle](https://github.com/huggingface/candle) runs.
2//!
3//! Record one representative JSONL trace ([`instrument::TraceSession`]), build an [`graph::ExecutionGraph`],
4//! and inspect it via CLI or HTML ([`viewer::render_evidence_html`]).
5//!
6//! There is **no static Rust analysis** — the graph comes only from what executed.
7
8pub mod cli;
9pub mod evidence;
10pub mod graph;
11pub mod instrument;
12pub mod nsight;
13pub mod phase;
14pub mod trace;
15#[cfg(feature = "visualizer")]
16pub mod viewer;
17
18pub use evidence::{build_evidence, Comparison, EvidencePacket, SpanComparison};
19pub use graph::{build_from_trace, ExecutionGraph};
20#[cfg(feature = "candle")]
21pub use instrument::candle;
22pub use instrument::{
23    MemoryRecord, OpRecord, ProfileRun, SpanGuard, SpanId, SpanKind, TensorRecord, TraceSession,
24};
25pub use nsight::{GpuEvidenceStatus, NsightEvidence};
26pub use phase::{ExecutionPhase, ExecutionStep};
27pub use trace::TimingMode;
28pub use trace::{parse_trace, write_jsonl, TraceDocument, TraceEvent, SCHEMA as TRACE_SCHEMA};