inference modification for custom operator, test=develop (#31283)

test_model_benchmark_ci
石晓伟 4 years ago committed by GitHub
parent cc89120a2c
commit 1da3280660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -667,10 +667,6 @@ void RegisterOperatorWithMetaInfo(
void RegisterOperatorWithMetaInfoMap(
const paddle::OpMetaInfoMap& op_meta_info_map) {
auto& meta_info_map = op_meta_info_map.GetMap();
PADDLE_ENFORCE_EQ(meta_info_map.empty(), false,
platform::errors::PreconditionNotMet(
"No custom operator that needs to be registered."));
VLOG(1) << "Custom Operator: size of op meta info map - "
<< meta_info_map.size();
// pair: {op_type, OpMetaInfo}

@ -21,6 +21,7 @@
#include <string>
#include <utility>
#include <vector>
#include "paddle/fluid/extension/include/ext_op_meta_info.h"
#include "paddle/fluid/framework/feed_fetch_method.h"
#include "paddle/fluid/framework/feed_fetch_type.h"
#include "paddle/fluid/framework/ir/fuse_pass_base.h"
@ -617,6 +618,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
static bool process_level_allocator_enabled;
std::call_once(gflags_initialized, [&]() {
paddle::RegisterAllCustomOperator();
std::vector<std::string> gflags;
PADDLE_ENFORCE_GE(
config.memory_pool_init_size_mb(), 0.f,

Loading…
Cancel
Save