diff --git a/exir/serde/export_serialize.py b/exir/serde/export_serialize.py index 570af19baf..08cd03adce 100644 --- a/exir/serde/export_serialize.py +++ b/exir/serde/export_serialize.py @@ -1847,7 +1847,13 @@ def deserialize( self.symbol_name_to_range = {} if symbol_name_to_range: for k, vr in symbol_name_to_range.items(): - lower = int(vr.lower) + if math.isinf(vr.lower) and vr.lower < 0: + lower = -math.inf + elif math.isinf(vr.lower): + lower = math.inf + else: + lower = int(vr.lower) + if vr.upper >= 2: # max is >= 2, not sym bool range lower = max(2, lower) self.symbol_name_to_range[k] = symbolic_shapes.ValueRanges(