class_docstr: Function to perform fixed-point arithmetic that can match integer arithmetic on hardware.
  
  Args:
      pre_act (`torch.Tensor`):
          Input tensor.
      pre_act_scaling_factor (`torch.Tensor`):
          Scaling factor of the input tensor *pre_act*.
      bit_num (`int`):
          Quantization bitwidth.
      z_scaling_factor (`torch.Tensor`):
          Scaling factor of the output tensor.
      identity (`torch.Tensor`, *optional*):
          Identity tensor, if exists.
      identity_scaling_factor (`torch.Tensor`, *optional*):
          Scaling factor of the identity tensor *identity*, if exists.
  
  Returns:
      `torch.Tensor`: Output tensor(*pre_act* if *identity* is not given, otherwise the addition of *pre_act* and
      *identity*), whose scale is rescaled to *z_scaling_factor*.
class_docstr_tok: ["Function","to","perform","fixed-point","arithmetic","that","can","match","integer","arithmetic","on","hardware",".","Args",":","pre_act","(","`","torch.Tensor","`",")",":","Input","tensor",".","pre_act_scaling_factor","(","`","torch.Tensor","`",")",":","Scaling","factor","of","the","input","tensor","*","pre_act","*",".","bit_num","(","`","int","`",")",":","Quantization","bitwidth",".","z_scaling_factor","(","`","torch.Tensor","`",")",":","Scaling","factor","of","the","output","tensor",".","identity","(","`","torch.Tensor","`",",","*","optional","*",")",":","Identity","tensor",",","if","exists",".","identity_scaling_factor","(","`","torch.Tensor","`",",","*","optional","*",")",":","Scaling","factor","of","the","identity","tensor","*","identity","*",",","if","exists",".","Returns",":","`","torch.Tensor","`",":","Output","tensor","(","*","pre_act","*","if","*","identity","*","is","not","given",",","otherwise","the","addition","of","*","pre_act","*","and","*","identity","*",")",",","whose","scale","is","rescaled","to","*","z_scaling_factor","*","."]
code: def backward(ctx, grad_output):
      identity_grad = None
      if ctx.identity is not None:
          identity_grad = grad_output.clone() / ctx.z_scaling_factor
      return (
          grad_output.clone() / ctx.z_scaling_factor,
          None,
          None,
          None,
          None,
          identity_grad,
          None,
      )
  
imports: import decimal
  import numpy
  import torch
  from torch import nn
  from torch.autograd import Function
  from ...utils import logging
label_desc: Use image node_id 2 for calling the FixedPointMul obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: unknown,  None,  None,  None,  None,  identity_grad,  None