Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Dec 14, 2024
1 parent 10fdfe1 commit d3bb480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/brevitas/export/inference/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def dequantize(self, x, scale, zero_point):
return (x - zero_point) * scale

def forward(self, x, unused_scale=None) -> Tuple[torch.Tensor]:
return self.dequantize(self.quantize(x)), self.scale, self.zero_point, self.bit_width
return self.dequantize(self.quantize(x, self.scale, self.zero_point), self.scale, self.zero_point), self.scale, self.zero_point, self.bit_width


class IntWeightInferencetHandler(IntInferencetHandler):
Expand Down
7 changes: 3 additions & 4 deletions src/brevitas/proxy/groupwise_int_runtime_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ class GroupwiseActQuantProxyFromInjector(ActQuantProxyFromInjector):
def __init__(self, quant_layer, quant_injector):
super().__init__(quant_layer, quant_injector)
self.cache_class = _CachedIOGroupwiseInt
self.group_dim = self.quant_injector.group_dim

# @property
# def group_dim(self):
# return self.quant_injector.group_dim
@property
def group_dim(self):
return self.quant_injector.group_dim

@property
def group_size(self):
Expand Down

0 comments on commit d3bb480

Please sign in to comment.