class_docstr: A benchmark class to validate 2 dimensional reduction performance.
  Only a simple add is fused to induce the fuser and isolate reduction perf.
class_docstr_tok: ["A","benchmark","class","to","validate","2","dimensional","reduction","performance",".","Only","a","simple","add","is","fused","to","induce","the","fuser","and","isolate","reduction","perf","."]
code: def __init__(self, mode, device, dtype, red_dim, dim0, dim1):
      super().__init__(mode, device, dtype)
      self.red_dim = red_dim
      self.dim0 = dim0
      self.dim1 = dim1
  
      self.inputs = [
          self.randn(
              [dim0, dim1],
              device=device,
              dtype=dtype,
              requires_grad=self.requires_grad,
          )
      ]
  
      if red_dim != 0 and red_dim != 1:
          raise ValueError(f"invalid reduction dimension: {red_dim}")
  
imports: from .None import benchmark
label_desc: Use image node_id 1 to create a new Reduce2DBench object from inherited base classes: benchmark with example: obj = Reduce2DBench(mode, device, dtype, red_dim, dim0, dim1)