docstr: Perform constant folding conversion and check that the non-const module is inlined
  correctly.
docstr_tok: ["Perform","constant","folding","conversion","and","check","that","the","non-const","module","is","inlined","correctly","."]
code: def test_check_inline_non_const(self):
      r"""
      Perform constant folding conversion and check that the non-const module is inlined
      correctly.
      """
  
      class ConstFoldTestModule(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.attr = torch.nn.Parameter(torch.randn(2, 3))
  
          def forward(self, x):
              a = self.attr + self.attr
              return (x - a * x) / 2
  
      mod = ConstFoldTestModule()
      gm = torch.fx.symbolic_trace(mod)
  
      gm_folded: const_fold.FoldedGraphModule = (
          const_fold.split_const_subgraphs(gm)
      )
      self._verify_const_fold_mod(gm_folded)
  
      # Check there are no call modules, because they've been inlined or extracted for
      # const folding.
      for node in gm_folded.graph.nodes:
          self.assertNotEqual(node.op, "call_module")
  
      # Now run both folded and non-folded to check results equal.
      in_x = torch.randn(2, 3)
      fold_result = gm_folded(in_x)
      base_result = mod(in_x)
      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 18 for calling the TestConstFold obj's underlying member method code with example usage: obj.test_check_inline_non_const() and returns: unknown