Skip to content

Commit

Permalink
[clean fluid api] Move fluid/contrib/slim and remove fluid api. (Padd…
Browse files Browse the repository at this point in the history
  • Loading branch information
zzjjay authored Dec 30, 2022
1 parent a186e60 commit 72973d5
Show file tree
Hide file tree
Showing 73 changed files with 1,605 additions and 3,037 deletions.
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if(WITH_TESTING)
add_subdirectory(paddle/tests)
add_subdirectory(paddle/fluid/tests)
add_subdirectory(paddle/fluid/contrib/tests)
add_subdirectory(paddle/fluid/contrib/slim/tests)
add_subdirectory(paddle/static/quantization/tests)
endif()

if(NOT WITH_SETUP_INSTALL)
Expand Down
4 changes: 1 addition & 3 deletions python/paddle/distributed/auto_parallel/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1617,9 +1617,7 @@ def save(self, path, training=True):
fetch_vars = self._fetch_vars["predict"]['outputs']
dist_main_prog = self._dist_main_progs["predict"][self._cur_rank]
if self._strategy.qat.enable and self._strategy.qat.onnx_format:
from paddle.fluid.contrib.slim.quantization import (
QuantWeightPass,
)
from paddle.static.quantization import QuantWeightPass

self._logger.info("export quantized model.")
self._logger.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

import paddle
from paddle.fluid import core, framework
from paddle.fluid.contrib.slim.quantization import (
from paddle.fluid.dygraph.parallel import ParallelEnv
from paddle.static.quantization import (
AddQuantDequantForInferencePass,
AddQuantDequantPassV2,
OutScaleForTrainingPass,
QuantizationTransformPassV2,
utils,
)
from paddle.fluid.dygraph.parallel import ParallelEnv

from ..auto_parallel.converter import Converter
from ..auto_parallel.dist_attribute import (
Expand Down
4 changes: 0 additions & 4 deletions python/paddle/fluid/contrib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
from .memory_usage_calc import *
from . import op_frequence
from .op_frequence import *
from . import quantize
from .quantize import *
from . import slim
from . import extend_optimizer
from .extend_optimizer import *
from . import model_stat
Expand All @@ -36,7 +33,6 @@

__all__ += memory_usage_calc.__all__
__all__ += op_frequence.__all__
__all__ += quantize.__all__
__all__ += extend_optimizer.__all__
__all__ += ['mixed_precision']
__all__ += layers.__all__
Expand Down
18 changes: 0 additions & 18 deletions python/paddle/fluid/contrib/quantize/__init__.py

This file was deleted.

Loading

0 comments on commit 72973d5

Please sign in to comment.