Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Sep 13, 2024
1 parent 9d82357 commit ea42506
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/brevitas/proxy/groupwise_int_runtime_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def create_quant_tensor(
qt_args: Union[torch.Tensor, Tuple[Any]],
x: Optional[GroupwiseIntQuantTensor] = None) -> GroupwiseIntQuantTensor:
if x is None:
value, scale, zero_point, bit_width, = qt_args
value, scale, zero_point, bit_width = qt_args
out = GroupwiseIntQuantTensor(
value,
scale,
Expand Down
6 changes: 3 additions & 3 deletions src/brevitas/proxy/runtime_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ def internal_forward(self, force_eval):
return out

def retrieve_attribute(self, attribute, force_eval):
if self.is_quant_enabled:
if self._cached_act is not None:
return getattr(self._cached_act, attribute)
elif self.is_quant_enabled:
out = self.internal_forward(force_eval)
return getattr(out, attribute)
elif self._cached_act is not None:
return getattr(self._cached_act, attribute)
elif self._cached_act is None:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class CNNInt8DynamicActPerTensorFloat(Int8DynamicActPerTensorFloat):
'asym': CNNShiftedUint8DynamicActPerTensorFloat}}},
'po2_scale': {
'stats': {
'per_group': MXInt8Act}}}},
'per_group': {'sym':MXInt8Act} }}}},
'float': {
'static': {
'float_scale': {
Expand Down

0 comments on commit ea42506

Please sign in to comment.