code: def test_addmm(self):
      def fn(a, b, c):
          return torch.add(a, torch.mm(b, c)), torch.mm(b, c) + a
  
      args_list = [
          (
              torch.randn(16, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              True,
          ),
          (
              torch.randn(8, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              torch.randn(16, 8, device="cuda"),
              True,
          ),
          (
              torch.randn(16, 16, device="cuda"),
              torch.randn(1, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              False,
          ),
          (
              torch.randn(1, 16, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              False,
          ),
          (
              4,
              torch.randn(16, 16, device="cuda"),
              torch.randn(16, 16, device="cuda"),
              False,
          ),
      ]
      for a, b, c, should_fuse in args_list:
          torch._dynamo.reset()
          counters.clear()
          args = (a, b, c)
          e1, e2 = fn(*args)
          a1, a2 = torch.compile(fn)(*args)
          torch.testing.assert_close(a1, e1)
          torch.testing.assert_close(a2, e2)
          count, nodes = (2, 4) if should_fuse else (0, 0)
          self.assertEqual(
              counters["inductor"]["pattern_matcher_count"], count
          )
          self.assertEqual(
              counters["inductor"]["pattern_matcher_nodes"], nodes
          )
  
imports: import copy
  import unittest
  import torch
  import torch._dynamo.config
  import torch._inductor.config
  from torch._dynamo.test_case import run_tests, TestCase
  from torch._dynamo.utils import count_calls, counters
  from torch._higher_order_ops.out_dtype import out_dtype
  from torch._inductor.fx_passes import joint_graph
  from torch._inductor.fx_passes.serialized_patterns.central_index import get_serialized_pattern
  from torch._inductor.pattern_matcher import _TargetExpr, Arg, CallFunction, gen_pattern, KeywordArg, Match, PatternExpr, PatternMatcherPass, PatternPrettyPrinter, register_graph_pattern, stable_topological_sort
  from torch._inductor.utils import run_and_get_code
  from torch._inductor.virtualized import V
  from torch.testing import FileCheck
  from torch.testing._internal.common_cuda import SM80OrLater
  from torch.testing._internal.common_utils import IS_LINUX, skipIfRocm
  from torch.testing._internal.inductor_utils import HAS_CUDA
label_desc: Use image node_id 16 for calling the TestPatternMatcher obj's underlying member method code with example usage: obj.test_addmm() and returns: torch,  unknown