pub fn validate_einsum_graph(graph: &EinsumGraph) -> ValidationResultExpand description
Validate an EinsumGraph for structural integrity.
Runs all structural checks and returns a unified ValidationResult.
§Checks performed
- Empty graph (warning) – graph has zero nodes
- Duplicate graph outputs (warning) – same tensor index listed twice
- Node input references (error) – node inputs reference non-existent tensors
- Node output references (error) – node outputs reference non-existent tensors
- Unreachable nodes (warning) – nodes whose outputs are never consumed
- Output references (error) – graph outputs reference non-existent tensors
- Outputs without producer (error) – output tensors not produced by any node or input
- Cycle detection (error) – data-flow cycles in the graph
- Empty node outputs (error) – nodes that produce no tensors
- Duplicate tensor names (info) – two tensors share the same name