Skip to main content

validate_einsum_graph

Function validate_einsum_graph 

Source
pub fn validate_einsum_graph(graph: &EinsumGraph) -> ValidationResult
Expand description

Validate an EinsumGraph for structural integrity.

Runs all structural checks and returns a unified ValidationResult.

§Checks performed

  1. Empty graph (warning) – graph has zero nodes
  2. Duplicate graph outputs (warning) – same tensor index listed twice
  3. Node input references (error) – node inputs reference non-existent tensors
  4. Node output references (error) – node outputs reference non-existent tensors
  5. Unreachable nodes (warning) – nodes whose outputs are never consumed
  6. Output references (error) – graph outputs reference non-existent tensors
  7. Outputs without producer (error) – output tensors not produced by any node or input
  8. Cycle detection (error) – data-flow cycles in the graph
  9. Empty node outputs (error) – nodes that produce no tensors
  10. Duplicate tensor names (info) – two tensors share the same name