pub fn apply_pattern_optimizations(
graph: &EinsumGraph,
) -> Result<(EinsumGraph, usize)>Expand description
Apply pattern-based graph transformations
Uses the IR’s pattern matching system to apply domain-specific optimizations and transformations to the graph.
§Example
use tensorlogic_compiler::passes::graph_opt_integration::apply_pattern_optimizations;
use tensorlogic_ir::EinsumGraph;
let graph = EinsumGraph::new();
let (optimized, count) = apply_pattern_optimizations(&graph).unwrap();
println!("Applied {} pattern-based optimizations", count);