code: def test_batched_mm(self, device, dtype, bs):
      fudge = 3
      rtol = default_rtol[dtype] * fudge
      atol = default_atol[dtype] * fudge
  
      for t_size in ts_list:
          ((a1_0, a1_1, a2_0, a2_1)) = t_size
  
          t1 = rand_math_tensor(
              (bs, a1_0, a1_1), dtype=dtype, device=device
          )
          t2 = rand_math_tensor(
              (bs, a2_0, a2_1), dtype=dtype, device=device
          )
          tadd = rand_math_tensor(
              (bs, a1_0, a2_1), dtype=dtype, device=device
          )
  
          run_comp_nocomp(torch_bmm, t1, t2, rtol=rtol, atol=atol)
  
          for alpha in (0, 1, -1, 0.5, -0.5):
              for beta in (0, 1, -1, 0.5, -0.5):
                  run_comp_nocomp(
                      torch_baddbmm,
                      tadd,
                      t1,
                      t2,
                      alpha,
                      beta,
                      rtol=rtol,
                      atol=atol,
                  )
  
imports: import math
  import unittest
  from typing import List, Tuple, Union
  import torch
  from torch._inductor import config
  from torch.testing._internal.common_cuda import SM80OrLater
  from torch.testing._internal.common_device_type import instantiate_device_type_tests
  from torch.testing._internal.common_nn import NNTestCase
  from torch.testing._internal.common_utils import IS_WINDOWS, parametrize, run_tests, TEST_CUDA
  from torch.utils._triton import has_triton
label_desc: Use image node_id 2 for calling the TestDecomp obj's underlying member method code with example usage: obj.test_batched_mm(device, dtype, bs) without return types