Rate this Page

torch.fx.passes.utils.common.compare_graphs#

torch.fx.passes.utils.common.compare_graphs(left, right)[source]#
Return True if two graphs are identical, i.e they
  • have the same number of outputs in the same order

  • have the same number of inputs in the same order

  • have the same set of nodes, and identical connectivity

Warning

This API is experimental and is NOT backward-compatible.

Return type:

bool