Skip to content

Commit

Permalink
change paddle required version to 1.8.4 (PaddlePaddle#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyfbupt authored Aug 15, 2020
1 parent 6ea943c commit 5ffcefb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions paddleslim/quant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,25 @@
import logging

import paddle.fluid as fluid
import paddle.version as fluid_version
from ..common import get_logger

_logger = get_logger(__name__, level=logging.INFO)

try:
fluid.require_version('2.0.0')
fluid.require_version('1.8.4')
version_installed = [
fluid_version.major, fluid_version.minor, fluid_version.patch,
fluid_version.rc
]
assert version_installed != [
'2', '0', '0-alpha0', '0'
], "training-aware and post-training quant is not supported in 2.0 alpha version paddle"
from .quanter import quant_aware, convert, quant_post_static, quant_post_dynamic
from .quanter import quant_post, quant_post_only_weight
except Exception as e:
_logger.warning(
"If you want to use training-aware and post-training quantization, "
"please use Paddle >= 2.0.0 or develop version")
"please use Paddle >= 1.8.4 or develop version")

from .quant_embedding import quant_embedding

0 comments on commit 5ffcefb

Please sign in to comment.