From f7bf4103a310feb7279ea9f5034cea2b986515c9 Mon Sep 17 00:00:00 2001 From: Nick Fraser Date: Thu, 30 Nov 2023 17:35:17 +0000 Subject: [PATCH] [quant_tensor] Updated div behaviour to throw RuntimeError when non-zero zero-point operands are used --- src/brevitas/quant_tensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brevitas/quant_tensor/__init__.py b/src/brevitas/quant_tensor/__init__.py index 6dda6bb32..707f12854 100644 --- a/src/brevitas/quant_tensor/__init__.py +++ b/src/brevitas/quant_tensor/__init__.py @@ -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,