From b89ca551a04ad7835d11ed8ca8a790f1707fa530 Mon Sep 17 00:00:00 2001 From: Ofir Gordon Date: Wed, 1 Jan 2025 10:42:13 +0200 Subject: [PATCH] minor fixes --- model_compression_toolkit/gptq/pytorch/quantization_facade.py | 2 +- .../target_platform/get_tpc_model.py | 3 --- .../target_platform/targetplatform2framework/attach2fw.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 model_compression_toolkit/target_platform_capabilities/target_platform/get_tpc_model.py diff --git a/model_compression_toolkit/gptq/pytorch/quantization_facade.py b/model_compression_toolkit/gptq/pytorch/quantization_facade.py index c3f2f3f71..38b09aaa8 100644 --- a/model_compression_toolkit/gptq/pytorch/quantization_facade.py +++ b/model_compression_toolkit/gptq/pytorch/quantization_facade.py @@ -144,7 +144,7 @@ def pytorch_gradient_post_training_quantization(model: Module, core_config: CoreConfig = CoreConfig(), gptq_config: GradientPTQConfig = None, gptq_representative_data_gen: Callable = None, - target_platform_capabilities: TargetPlatformModel = None): + target_platform_capabilities: TargetPlatformModel = DEFAULT_PYTORCH_TPC): """ Quantize a trained Pytorch module using post-training quantization. By default, the module is quantized using a symmetric constraint quantization thresholds diff --git a/model_compression_toolkit/target_platform_capabilities/target_platform/get_tpc_model.py b/model_compression_toolkit/target_platform_capabilities/target_platform/get_tpc_model.py deleted file mode 100644 index b28b04f64..000000000 --- a/model_compression_toolkit/target_platform_capabilities/target_platform/get_tpc_model.py +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/attach2fw.py b/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/attach2fw.py index ff5e5c1ae..d9310b568 100644 --- a/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/attach2fw.py +++ b/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/attach2fw.py @@ -37,7 +37,6 @@ def attach(self, tpc_model: TargetPlatformModel, """ tpc = TargetPlatformCapabilities(tpc_model) - # tpc_model_opsets = [opset.name for opset in tpc_model.operator_set if isinstance(opset, OperatorsSet)] custom_opset2layer = custom_opset2layer if custom_opset2layer is not None else {} with tpc: