Skip to content

Commit 3ae057a

Browse files
authored
fix ac import ptq_hpo (PaddlePaddle#1170)
1 parent 1b498f1 commit 3ae057a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

paddleslim/auto_compression/compressor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
try:
3737
if platform.system().lower() == 'linux':
38-
from ..quant import quant_post_hpo
38+
from ..quant import post_quant_hpo
3939
except Exception as e:
4040
_logger.warning(e)
4141

@@ -409,7 +409,7 @@ def compress(self):
409409

410410
if strategy == 'ptq_hpo' and config.max_quant_count == 1 and platform.system(
411411
).lower() == 'linux':
412-
ptq_loss = quant_post_hpo.g_min_emd_loss
412+
ptq_loss = post_quant_hpo.g_min_emd_loss
413413

414414
final_quant_config = get_final_quant_config(ptq_loss)
415415
if final_quant_config is not None:
@@ -468,7 +468,7 @@ def single_strategy_compress(self, strategy, config, strategy_idx):
468468
raise NotImplementedError(
469469
"post-quant-hpo is not support in system other than linux")
470470

471-
quant_post_hpo.quant_post_hpo(
471+
post_quant_hpo.quant_post_hpo(
472472
self._exe,
473473
self._places,
474474
model_dir=self.model_dir,

paddleslim/quant/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .quanter import quant_post, quant_post_only_weight
3535
from .quant_aware_with_infermodel import quant_aware_with_infermodel, export_quant_infermodel
3636
if platform.system().lower() == 'linux':
37-
from .quant_post_hpo import quant_post_hpo
37+
from .post_quant_hpo import quant_post_hpo
3838
else:
3939
_logger.warning(
4040
"post-quant-hpo is not support in system other than linux")

0 commit comments

Comments
 (0)