Skip to content

Commit

Permalink
[quant_tensor] Updated div behaviour to throw RuntimeError when non-z…
Browse files Browse the repository at this point in the history
…ero zero-point operands are used
  • Loading branch information
nickfraser committed Dec 20, 2023
1 parent e4c3dc1 commit f7bf410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brevitas/quant_tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def __truediv__(self, other):
if self.is_zero_zero_point(self) and self.is_zero_zero_point(other):
output_zero_point = self.zero_point * other.zero_point # Output zero_point is a new, zero-valued tensor
else:
output_zero_point = None # TODO non-zero zero point
raise RuntimeError("Zero-points of div operands are non-zero, not supported.")
output = QuantTensor(
value=output_tensor,
scale=output_scale,
Expand Down

0 comments on commit f7bf410

Please sign in to comment.