code: def backward(ctx, grad_output):
      if ctx.is_empty:
          return (
              torch.zeros_like(ctx.A),
              torch.zeros_like(ctx.B),
              None,
              None,
              None,
              None,
              None,
          )
  
      req_gradA, req_gradB, _, _, _, _, _ = ctx.needs_input_grad
      A, B = ctx.tensors
  
      grad_A, grad_B = None, None
  
      # TODO: Fix blocksize to be output_dim
      cgrad_out, state = F.quantize(
          grad_output.float(), code=ctx.bw_code
      )
      fp8out = F.dequantize(cgrad_out, state).to(grad_output.dtype)
  
      # cgrad_output_2, state_2 = F.quantize(grad_output.float(), code=ctx.bw_code)
      # fp8out_2 = F.dequantize(cgrad_output_2, state_2).to(grad_output.dtype)
  
      # grad_output_reshape = grad_output.reshape(-1, grad_output.shape[-1]).contiguous()
      # fp8grad_transpose, stategrad_transpose = F.vectorwise_quant(grad_output_reshape, dim=0, quant_type='vector')
      # fp8out_transpose = (fp8grad_transpose / 7) * stategrad_transpose
      # fp8out_transpose = fp8out_transpose.view(grad_output.shape[0], grad_output.shape[1], grad_output.shape[2])
  
      # not supported by PyTorch. TODO: create work-around
      if req_gradA:
          grad_A = torch.matmul(fp8out, B.t().to(fp8out.dtype)).to(
              A.dtype
          )
  
      if req_gradB:
          if len(A.shape) == 3:
              At = A.transpose(2, 1).contiguous()
          else:
              At = A.transpose(1, 0).contiguous()
          cA, state = F.quantize(At.float(), code=ctx.fw_code)
          fp8At = F.dequantize(cA, state).to(A.dtype)
          grad_B = torch.matmul(fp8At.to(fp8out.dtype), fp8out).to(
              B.dtype
          )
  
      return grad_A, grad_B, None, None, None, None, None
  
imports: import operator
  import warnings
  from dataclasses import dataclass
  from functools import reduce
  import torch
  import bitsandbytes.functional
  from bitsandbytes.autograd._functions import MatmulLtState, GlobalOutlierPooler
label_desc: Use image node_id 2 for calling the MatMulFP8Global obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: grad_A,  grad_B,  None,  None,  None,  None,  None, torch,  torch,  None,  None,  None,  None,  None