docstr: Perform constant folding conversion, from original mod to split constant folding
  module with two split subgraphs, where there's a single attr to fold and
  a single output attr result to replace. Name the attrs such that they will
  collide by name with folded attrs.
  
     add_1                 add_1
      | |                   | |
  x   add                   add
   \ /                       |
   sub   y                 output     (becomes attr add_1)
      \ /         ==> -------+------- (const/base subgraph split)
      mul  add_2       x   /          (input from previous subgraph
        \ /             \ /            is attr)
        add             sub   y
         |                 \ /
       output              mul  add_2
                             \ /
                             add
                              |
                            output
docstr_tok: ["Perform","constant","folding","conversion",",","from","original","mod","to","split","constant","folding","module","with","two","split","subgraphs",",","where","there","'s","a","single","attr","to","fold","and","a","single","output","attr","result","to","replace",".","Name","the","attrs","such","that","they","will","collide","by","name","with","folded","attrs",".","add_1","add_1","|","|","|","|","x","add","add","\\","\/","|","sub","y","output","(","becomes","attr","add_1",")","\\","\/","==",">","--","--","--","-+","--","--","--","-","(","const\/base","subgraph","split",")","mul","add_2","x","\/","(","input","from","previous","subgraph","\\","\/","\\","\/","is","attr",")","add","sub","y","|","\\","\/","output","mul","add_2","\\","\/","add","|","output"]
code: def test_const_fold_basic_one_attr_name_collision(self):
      r"""
      Perform constant folding conversion, from original mod to split constant folding
      module with two split subgraphs, where there's a single attr to fold and
      a single output attr result to replace. Name the attrs such that they will
      collide by name with folded attrs.
  
         add_1                 add_1
          | |                   | |
      x   add                   add
       \ /                       |
       sub   y                 output     (becomes attr add_1)
          \ /         ==> -------+------- (const/base subgraph split)
          mul  add_2       x   /          (input from previous subgraph
            \ /             \ /            is attr)
            add             sub   y
             |                 \ /
           output              mul  add_2
                                 \ /
                                 add
                                  |
                                output
      """
  
      class ConstFoldTestModule(torch.nn.Module):
          def __init__(self):
              super().__init__()
              # Note: Named as such to result in name collision.
              self.add_1__CF = torch.nn.Parameter(torch.tensor([[1.0]]))
              self.add_2__CF = torch.nn.Parameter(
                  torch.tensor([[17.1]])
              )
  
          def forward(self, x, y):
              a = self.add_1__CF + self.add_1__CF
              x = x - a
              return x * y + self.add_2__CF
  
      mod = ConstFoldTestModule()
      mod_folded: const_fold.FoldedGraphModule = (
          const_fold.split_const_subgraphs(mod)
      )
      self._verify_const_fold_mod(mod_folded)
  
      # Now run both folded and non-folded to check results equal.
      in_x, in_y = torch.tensor([[5.0]]), torch.tensor([4.0])
      base_result = mod(in_x, in_y)
      fold_result = mod_folded(in_x, in_y)
      self.assertTrue(torch.equal(fold_result, base_result))
  
imports: import operator
  import torch
  import torch.fx
  from torch.fx.experimental import const_fold
  from torch.fx.passes.shape_prop import _extract_tensor_metadata, ShapeProp
  from torch.testing._internal.common_utils import TestCase
label_desc: Use image node_id 4 for calling the TestConstFold obj's underlying member method code with example usage: obj.test_const_fold_basic_one_attr_name_collision() and returns: unknown