xlnstorch.tensor_utils.handle_overflow

xlnstorch.tensor_utils.handle_overflow#

xlnstorch.tensor_utils.handle_overflow(*tensors, inplace=False, no_grad=False)#

Handle overflow for a variable number of LNSTensors based on global overflow limits.

Parameters:
  • tensors (LNSTensor) – Variable number of LNSTensor objects to check for overflow.

  • inplace (bool, optional) – If True, modifies the input tensors in place. Default is False.

  • no_grad (bool, optional) – If True, disables gradient tracking during overflow handling. Default is False.

Return type:

List[LNSTensor]