code: def axpby(
      self,
      sizea,
      sizeb,
      applier,
      repeat_tensors,
      x_type,
      y_type,
      out_type,
      inplace=False,
      nhwc=False,
  ):
      self.overflow_buf.zero_()
      sizea = sizea if isinstance(sizea, tuple) else (sizea,)
      sizeb = sizeb if isinstance(sizeb, tuple) else (sizeb,)
      t1 = torch.full(sizea, 1.0, device="cuda", dtype=torch.float32)
      t2 = torch.full(sizeb, 1.0, device="cuda", dtype=torch.float32)
  
      def to_fmt(t, tp):
          if nhwc:
              return t.clone().to(tp, memory_format=torch.channels_last)
          else:
              return t.clone().to(tp)
  
      y_list = []
      for i in range(repeat_tensors):
          y_list += [
              to_fmt(t1, y_type) * self.yval,
              to_fmt(t2, y_type) * self.yval,
          ]
  
      x_list = [
          to_fmt(x, x_type) * (self.xval / self.yval) for x in y_list
      ]
  
      if inplace:
          out_list = y_list
      else:
          out_list = [to_fmt(out, out_type) * 3.0 for out in y_list]
  
      applier(
          multi_tensor_axpby,
          self.overflow_buf,
          [x_list, y_list, out_list],
          self.a,
          self.b,
          -1,
      )
  
      self.assertTrue(
          all(
              [
                  torch.allclose(out, self.ref.to(out_type))
                  for out in out_list
              ]
          ),
          msg="{} {} {} {} {} {} {}".format(
              sizea,
              sizeb,
              repeat_tensors,
              x_type,
              y_type,
              out_type,
              inplace,
          ),
      )
      self.assertTrue(
          self.overflow_buf.item() == 0,
          msg="{} {} {} {} {} {} {}".format(
              sizea,
              sizeb,
              repeat_tensors,
              x_type,
              y_type,
              out_type,
              inplace,
          ),
      )
  
file_path: apex/tests/L0/run_amp/test_multi_tensor_axpby.py
imports: import unittest
  import functools
  import itertools
  from apex import amp
  import torch
  from torch import nn
  import torch.nn.functional
  from math import floor
  from utils import common_init, HALF, FLOAT, ALWAYS_HALF, ALWAYS_FLOAT, MATCH_INPUT
label_desc: Use image node_id 3 for calling the TestMultiTensorAxpby obj's underlying member method code with example usage: obj.axpby(sizea, sizeb, applier, repeat_tensors, x_type, y_type, out_type, inplace, nhwc) and returns: t, t