未验证 提交 5034d181 编写于 作者: W Wilber 提交者: GitHub

update for 2.0 inference api. (#27473)

上级 76506447
...@@ -1048,6 +1048,7 @@ void AnalysisPredictor::SaveOptimModel(const std::string &dir) { ...@@ -1048,6 +1048,7 @@ void AnalysisPredictor::SaveOptimModel(const std::string &dir) {
template <> template <>
std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<AnalysisConfig>( std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<AnalysisConfig>(
const AnalysisConfig &config) { const AnalysisConfig &config) {
LOG(WARNING) << "Deprecated. Please use CreatePredictor instead.";
return CreatePaddlePredictor<AnalysisConfig, PaddleEngineKind::kAnalysis>( return CreatePaddlePredictor<AnalysisConfig, PaddleEngineKind::kAnalysis>(
config); config);
} }
......
...@@ -373,6 +373,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor< ...@@ -373,6 +373,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
template <> template <>
std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<NativeConfig>( std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<NativeConfig>(
const NativeConfig &config) { const NativeConfig &config) {
LOG(WARNING) << "Deprecated. Please use CreatePredictor instead.";
return CreatePaddlePredictor<NativeConfig, PaddleEngineKind::kNative>(config); return CreatePaddlePredictor<NativeConfig, PaddleEngineKind::kNative>(config);
} }
......
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ..fluid.inference import Config, DataType, PlaceType, PrecisionType, Tensor, \
Predictor, create_predictor, get_version, get_num_bytes_of_data_type, PredictorPool
...@@ -155,6 +155,7 @@ packages=['paddle', ...@@ -155,6 +155,7 @@ packages=['paddle',
'paddle.distributed.fleet.utils', 'paddle.distributed.fleet.utils',
'paddle.framework', 'paddle.framework',
'paddle.jit', 'paddle.jit',
'paddle.inference',
'paddle.fluid', 'paddle.fluid',
'paddle.fluid.inference', 'paddle.fluid.inference',
'paddle.fluid.dygraph', 'paddle.fluid.dygraph',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册