Skip to content

Commit

Permalink
Fix for torch export
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Jan 18, 2024
1 parent 3472e7c commit 4a56450
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/brevitas/export/torch/qcdq/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from brevitas.export.common.handler.qcdq import CDQCastDecoupledWeightQuantProxyHandlerMixin
from brevitas.export.common.handler.qcdq import \
CDQCastDecoupledWeightQuantWithInputProxyHandlerMixin
from brevitas.export.common.handler.qcdq import CDQCastMixin
from brevitas.export.common.handler.qcdq import CDQCastWeightQuantProxyHandlerMixin
from brevitas.export.common.handler.qcdq import DQCastMixin
from brevitas.export.common.handler.qcdq import QCDQCastActQuantProxyHandlerMixin
Expand Down Expand Up @@ -56,7 +57,7 @@ def validate(self, module):
assert module.bit_width() > 1., 'Binary quant not supported'


class TorchCDQCastMixin(TorchDQCastMixin, ABC):
class TorchCDQCastMixin(CDQCastMixin, TorchDQCastMixin, ABC):

def clip_fn(self, x, min_val, max_val):
return torch.clamp(x, min_val, max_val)
Expand Down

0 comments on commit 4a56450

Please sign in to comment.