code: def run_test(L, B, D, D2):
      print("")
      print("===========================")
      print("L={} B={} D={} D2={}".format(L, B, D, D2))
      print("---------------------------")
      weight = nn.Parameter(torch.Tensor(D, D2 * 3)).cuda()
      weight.data.uniform_(-((3.0 / D) ** 0.5), (3.0 / D) ** 0.5)
      weight_t = nn.Parameter(torch.Tensor(D2 * 3, D)).cuda()
      weight_t.data.copy_(weight.data.t())
      bias = nn.Parameter(torch.zeros(D2 * 3))
      bias.requires_grad = False
      bias = bias.cuda()
      x = [
          torch.randn(L, B, D, requires_grad=True).cuda()
          for i in range(10)
      ]
      # print (type(weight), weight.type(), weight.requires_grad)
      # print (type(bias), bias.type(), bias.requires_grad)
      # print (type(x[0]), x[0].type(), x[0].requires_grad)
      run_mm(x, weight)
      run_matmul(x, weight)
      run_addmm(x, weight, bias)
      print("Transposed:")
      run_mm(x, weight_t.t())
      run_matmul(x, weight_t.t())
      run_addmm(x, weight_t.t(), bias)
      print("===========================")
  
file_path: sru/misc/test_mm.py
imports: import time
  import torch
  import torch.nn
label_desc: Use image node_id 4 for calling a global function with example usage: run_test(L, B, D, D2) without return types