class_docstr: The main idea here is that it's difficult to maintain accurate fake
  tensors (our primary form of metadata) for each node in our graph as we
  transform it.
  
  The most reliable way to obtain this information is by rerunning
  faketensor propagation. However, in general, faketensor propagation is
  fairly expensive. So, instead we'd like to only rerun faketensor
  propagation on nodes that have changed.
  
  In order to detect which nodes have changed, we first hash its node,
  target, and argument lists (which are immutable in FX).
  
  Then, whenever we call incremental_update, we check which FX nodes have a
  new hash, and recompute the faketensor metadata for that node. Then, we
  continue to recursively compute the faketensors for all users until the
  fake tensors stop changing.
class_docstr_tok: ["The","main","idea","here","is","that","it","'s","difficult","to","maintain","accurate","fake","tensors","(","our","primary","form","of","metadata",")","for","each","node","in","our","graph","as","we","transform","it",".","The","most","reliable","way","to","obtain","this","information","is","by","rerunning","faketensor","propagation",".","However",",","in","general",",","faketensor","propagation","is","fairly","expensive",".","So",",","instead","we","'d","like","to","only","rerun","faketensor","propagation","on","nodes","that","have","changed",".","In","order","to","detect","which","nodes","have","changed",",","we","first","hash","its","node",",","target",",","and","argument","lists","(","which","are","immutable","in","FX",")",".","Then",",","whenever","we","call","incremental_update",",","we","check","which","FX","nodes","have","a","new","hash",",","and","recompute","the","faketensor","metadata","for","that","node",".","Then",",","we","continue","to","recursively","compute","the","faketensors","for","all","users","until","the","fake","tensors","stop","changing","."]
code: def __init__(self, graph: torch.fx.Graph):
      self.processed_hashes = set()
      self.graph = graph
  
      for node in self.graph.nodes:
          self.processed_hashes.add(self.hash_node(node))
  
file_path: pytorch/torch/_inductor/fx_utils.py
imports: from collections import defaultdict
  from typing import Any, Callable, DefaultDict, Dict, Optional, Tuple, Type
  import torch
  import torch.fx
  from torch.fx.experimental.symbolic_shapes import statically_known_true, sym_eq
  from torch.utils import _pytree
  from torch.utils._pytree import tree_map
  from .virtualized import V
label_desc: Use image node_id 1 to create a new FakeTensorUpdater object  with example: obj = FakeTensorUpdater(graph)