xlnstorch.csrc.float_to_lns_backward

xlnstorch.csrc.float_to_lns_backward#

xlnstorch.csrc.float_to_lns_backward(grad, base)#

Convert the gradient from LNS representation back to floating-point representation.

Parameters:
  • grad (torch.Tensor) – The gradient tensor in LNS format (torch.int64).

  • base (torch.Tensor) – The base for the LNS representation.

Returns:

The output gradient tensor in floating-point format (float64).

Return type:

torch.Tensor