paddle_engine.cpp 1.5 KB
Newer Older
Z
zhangjun 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// Copyright (c) 2021 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.

#include "paddle_inference/paddle/include/paddle_engine.h"
#include "core/predictor/framework/factory.h"

namespace baidu {
namespace paddle_serving {
Z
update  
zhangjun 已提交
20
namespace inference {
Z
zhangjun 已提交
21

Z
zhangjun 已提交
22
DEFINE_int32(gpuid, 0, "GPU device id to use");
Z
zhangjun 已提交
23
DEFINE_string(precision, "fp32", "precision to deploy, default is fp32");
Z
fix  
zhangjun 已提交
24
DEFINE_bool(use_calib, false, "calibration mode, default is false");
25 26 27 28 29
DEFINE_string(nnadapter_device_names, "", "Names of nnadapter device");
DEFINE_string(nnadapter_context_properties,
              "",
              "Properties of nnadapter context");
DEFINE_string(nnadapter_model_cache_dir, "", "Cache dir of nnadapter model");
Z
zhangjun 已提交
30

Z
fix  
zhangjun 已提交
31 32 33 34
REGIST_FACTORY_OBJECT_IMPL_WITH_NAME(
    ::baidu::paddle_serving::predictor::FluidInferEngine<PaddleInferenceEngine>,
    ::baidu::paddle_serving::predictor::InferEngine,
    "PADDLE_INFER");
Z
zhangjun 已提交
35

Z
update  
zhangjun 已提交
36
}  // namespace inference
Z
zhangjun 已提交
37 38
}  // namespace paddle_serving
}  // namespace baidu