docstr: Perform constant folding with a call_module node.
docstr_tok: ["Perform","constant","folding","with","a","call_module","node","."]
code: def test_fold_module(self):
      r"""
      Perform constant folding with a call_module node.
      """
  
      class ConstFoldTestModule(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.lin_input = torch.nn.Parameter(torch.randn(4, 4))
              self.lin = torch.nn.Linear(4, 4)
  
          def forward(self, x):
              return self.lin(self.lin_input) + x
  
      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.
      inp = torch.randn(4, 4)
      self.assertTrue(torch.equal(mod_folded(inp), mod(inp)))
  
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 21 for calling the TestConstFold obj's underlying member method code with example usage: obj.test_fold_module() and returns: unknown