GraphRewrite #
Graph rewrite / diff viewer.
TorchLean’s IR is designed to support compilation and optimization passes. When working on those passes, the most useful debugging UI is "before/after":
- render both graphs,
- show which nodes changed (op kind / parents / shapes),
- and make it obvious when a pass accidentally changes shapes or dependencies.
Main command:
#graph_rewrite_view before, after
Main definitions #
diffRows: align nodes by id for before/after comparison.graphRewriteHtml: side-by-side graph panels plus id-wise diff table.#graph_rewrite_view: command entry point.
Render a side-by-side graph diff panel plus a per-node "changed/same" table.