code: def test_pointless_cumsum(self):
      def fn1():
          ones = torch.full(
              [1, 128], 1, layout=torch.strided, dtype=torch.float32
          ).to(torch.int64)
          return torch.cumsum(ones, 1) * ones
  
      def fn2():
          ones = torch.full(
              [55, 10], 1, layout=torch.strided, dtype=torch.float32
          ).to(torch.int64)
          return torch.cumsum(ones, 1)
  
      def fn3():
          twos = torch.full([5, 4, 3], 2, dtype=torch.int64)
          return torch.cumsum(twos, 0)
  
      def fn4():
          x = torch.full([100], 0.1, dtype=torch.float32)
          return torch.cumsum(x, 0)
  
      def fn5():
          t1 = torch.full([2, 4], 1)
          t2 = t1.to(dtype=torch.bool)
          return torch.cumsum(t2, 1)
  
      def fn6():
          x = torch.full([10, 10], True, dtype=torch.int32)
          return torch.cumsum(x, 1)
  
      for fn in (fn1, fn2, fn3, fn4, fn5, fn6):
          result, (code,) = run_and_get_code(
              torch.compile(fn, fullgraph=True)
          )
          self.assertNotIn("aten.cumsum", code)
          self.assertEqual(result, fn())
          self.assertEqual(
              counters["inductor"]["pattern_matcher_count"], 1
          )
          counters.clear()
  
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 23 for calling the TestPatternMatcher obj's underlying member method code with example usage: obj.test_pointless_cumsum() and returns: unknown, torch, torch, torch, torch, torch