Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Dec 21, 2023
1 parent f6bd017 commit 4d2c0dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/brevitas/quant_tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,9 @@ def contiguous(self):

def int(self, float_datatype=False):
if self.is_valid:
# After rounding, cast to the original dtype of the scale factor
int_value = round_ste(self._pre_round_int_value)
if float_datatype:
# values in 8bit and lower can be represented exactly with float16 and bfloat16
# Values at 8bit and lower can be represented exactly with float16 and bfloat16
# otherwise (e.g. Int16 bias), we upscale to float32
if self.bit_width <= 8.:
return int_value.type(self.scale.dtype)
Expand Down

0 comments on commit 4d2c0dc

Please sign in to comment.