pub struct ExprGraph {
pub nodes: Vec<ExprNode>,
pub edges: Vec<ExprEdge>,
pub entry_return: Option<NodeId>,
pub loss_nodes: Vec<NodeId>,
pub param_nodes: Vec<NodeId>,
pub tensor_nodes: Vec<NodeId>,
pub dtype_conflicts: Vec<DtypeConflict>,
pub dtype_risks: Vec<DtypeRisk>,
pub numeric_domain_violations: Vec<NumericDomainViolation>,
pub zero_times_infinity: Vec<ZeroTimesInfinity>,
pub diagnostics: Vec<DataflowDiagnostic>,
}Fields§
§nodes: Vec<ExprNode>§edges: Vec<ExprEdge>§entry_return: Option<NodeId>Entrypoint return node, when analysis produced one.
loss_nodes: Vec<NodeId>Nodes that are loss sinks (cross_entropy, mse, …).
param_nodes: Vec<NodeId>Trainable / frozen parameter leaves discovered during analysis.
tensor_nodes: Vec<NodeId>Nodes proven to be Candle tensor values. Non-tensor expressions stay out of ModelIr.
dtype_conflicts: Vec<DtypeConflict>§dtype_risks: Vec<DtypeRisk>§numeric_domain_violations: Vec<NumericDomainViolation>§zero_times_infinity: Vec<ZeroTimesInfinity>§diagnostics: Vec<DataflowDiagnostic>Implementations§
Source§impl ExprGraph
impl ExprGraph
pub fn node(&self, id: NodeId) -> &ExprNode
pub fn edge(&self, id: EdgeId) -> &ExprEdge
Sourcepub fn dead_params(&self) -> Vec<NodeId>
pub fn dead_params(&self) -> Vec<NodeId>
Trainable leaves with no reverse data path to any loss node.
Sourcepub fn severing_edges(&self) -> Vec<EdgeId>
pub fn severing_edges(&self) -> Vec<EdgeId>
Edges marked as severing autograd.
Sourcepub fn dtype_conflicts(&self) -> &[DtypeConflict]
pub fn dtype_conflicts(&self) -> &[DtypeConflict]
Same-dtype operand mismatches recorded during transfer.
Sourcepub fn dtype_risks(&self) -> &[DtypeRisk]
pub fn dtype_risks(&self) -> &[DtypeRisk]
Partially-known operands at an op that requires matching dtypes.
Sourcepub fn paths_to(&self, from: NodeId, to: NodeId) -> Vec<Vec<NodeId>>
pub fn paths_to(&self, from: NodeId, to: NodeId) -> Vec<Vec<NodeId>>
Differentiable paths from from to to; severing edges are intentionally excluded.
Caps path count to keep recursion honest on dense graphs.
Sourcepub fn reachable_from(&self, start: NodeId) -> HashSet<NodeId>
pub fn reachable_from(&self, start: NodeId) -> HashSet<NodeId>
Forward-reachable nodes from start along non-severing edges.
Sourcepub fn classify_numeric_impacts(&mut self)
pub fn classify_numeric_impacts(&mut self)
Classify numeric hazards by whether they can fail training or interfere with inference.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExprGraph
impl RefUnwindSafe for ExprGraph
impl Send for ExprGraph
impl Sync for ExprGraph
impl Unpin for ExprGraph
impl UnsafeUnpin for ExprGraph
impl UnwindSafe for ExprGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more