xlnstorch.tensor_utils.set_overflow_limits

xlnstorch.tensor_utils.set_overflow_limits#

xlnstorch.tensor_utils.set_overflow_limits(max=None, min=None)#

Set global overflow limits for the handle_overflow function.

Parameters:
  • max (float, optional) – Maximum representable value in LNS. Values exceeding this will be clamped to this maximum. If None, no maximum limit is set.

  • min (float, optional) – Minimum representable value in LNS. Values below this will be clamped to zero. If None, no minimum limit is set.