From 4a56450fb718d0f857d676557c8879901f46e144 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Thu, 18 Jan 2024 12:50:52 +0000 Subject: [PATCH] Fix for torch export --- src/brevitas/export/torch/qcdq/handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/brevitas/export/torch/qcdq/handler.py b/src/brevitas/export/torch/qcdq/handler.py index ccbfc75d1..8cf81e3fd 100644 --- a/src/brevitas/export/torch/qcdq/handler.py +++ b/src/brevitas/export/torch/qcdq/handler.py @@ -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 @@ -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)