diff --git a/paddleslim/auto_compression/compressor.py b/paddleslim/auto_compression/compressor.py index 72dd3485991057d68435f73af107dfcc75cdb768..4d47ee1033823dda600e8243ed83c8b38af71dcf 100644 --- a/paddleslim/auto_compression/compressor.py +++ b/paddleslim/auto_compression/compressor.py @@ -35,7 +35,7 @@ _logger = get_logger(__name__, level=logging.INFO) try: if platform.system().lower() == 'linux': - from ..quant import quant_post_hpo + from ..quant import post_quant_hpo except Exception as e: _logger.warning(e) @@ -409,7 +409,7 @@ class AutoCompression: if strategy == 'ptq_hpo' and config.max_quant_count == 1 and platform.system( ).lower() == 'linux': - ptq_loss = quant_post_hpo.g_min_emd_loss + ptq_loss = post_quant_hpo.g_min_emd_loss final_quant_config = get_final_quant_config(ptq_loss) if final_quant_config is not None: @@ -468,7 +468,7 @@ class AutoCompression: raise NotImplementedError( "post-quant-hpo is not support in system other than linux") - quant_post_hpo.quant_post_hpo( + post_quant_hpo.quant_post_hpo( self._exe, self._places, model_dir=self.model_dir, diff --git a/paddleslim/quant/__init__.py b/paddleslim/quant/__init__.py index 808a9abc8faed2aacaa664187bf0e0fe3b19438a..e4d59b94ae8a4b776976934740e2cf080caf1f8f 100644 --- a/paddleslim/quant/__init__.py +++ b/paddleslim/quant/__init__.py @@ -34,7 +34,7 @@ try: from .quanter import quant_post, quant_post_only_weight from .quant_aware_with_infermodel import quant_aware_with_infermodel, export_quant_infermodel if platform.system().lower() == 'linux': - from .quant_post_hpo import quant_post_hpo + from .post_quant_hpo import quant_post_hpo else: _logger.warning( "post-quant-hpo is not support in system other than linux") diff --git a/paddleslim/quant/quant_post_hpo.py b/paddleslim/quant/post_quant_hpo.py similarity index 100% rename from paddleslim/quant/quant_post_hpo.py rename to paddleslim/quant/post_quant_hpo.py