提交 fdebc240 编写于 作者: M MRXLT

fix gpu server log

上级 e31e3884
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <string> #include <string>
#include <utility>
#include <vector> #include <vector>
#include "core/predictor/common/inner_common.h" #include "core/predictor/common/inner_common.h"
#include "core/predictor/framework/bsf.h" #include "core/predictor/framework/bsf.h"
...@@ -588,12 +589,14 @@ class VersionedInferEngine : public InferEngine { ...@@ -588,12 +589,14 @@ class VersionedInferEngine : public InferEngine {
LOG(ERROR) << "Failed generate engine with type:" << engine_type; LOG(ERROR) << "Failed generate engine with type:" << engine_type;
return -1; return -1;
} }
VLOG(2) << "FLGS_logtostderr " << FLAGS_logtostderr;
int tmp = FLAGS_logtostderr;
if (engine->proc_initialize(conf, version) != 0) { if (engine->proc_initialize(conf, version) != 0) {
LOG(ERROR) << "Failed initialize engine, type:" << engine_type; LOG(ERROR) << "Failed initialize engine, type:" << engine_type;
return -1; return -1;
} }
VLOG(2) << "FLGS_logtostderr " << FLAGS_logtostderr;
FLAGS_logtostderr = tmp;
auto r = _versions.insert(std::make_pair(engine->version(), engine)); auto r = _versions.insert(std::make_pair(engine->version(), engine));
if (!r.second) { if (!r.second) {
LOG(ERROR) << "Failed insert item: " << engine->version() LOG(ERROR) << "Failed insert item: " << engine->version()
...@@ -760,7 +763,6 @@ class InferManager { ...@@ -760,7 +763,6 @@ class InferManager {
LOG(ERROR) << "failed load infer config, path: " << path << "/" << file; LOG(ERROR) << "failed load infer config, path: " << path << "/" << file;
return -1; return -1;
} }
size_t engine_num = model_toolkit_conf.engines_size(); size_t engine_num = model_toolkit_conf.engines_size();
for (size_t ei = 0; ei < engine_num; ++ei) { for (size_t ei = 0; ei < engine_num; ++ei) {
std::string engine_name = model_toolkit_conf.engines(ei).name(); std::string engine_name = model_toolkit_conf.engines(ei).name();
...@@ -769,12 +771,10 @@ class InferManager { ...@@ -769,12 +771,10 @@ class InferManager {
LOG(ERROR) << "Failed generate versioned engine: " << engine_name; LOG(ERROR) << "Failed generate versioned engine: " << engine_name;
return -1; return -1;
} }
if (engine->proc_initialize(model_toolkit_conf.engines(ei)) != 0) { if (engine->proc_initialize(model_toolkit_conf.engines(ei)) != 0) {
LOG(ERROR) << "Failed initialize version engine, name:" << engine_name; LOG(ERROR) << "Failed initialize version engine, name:" << engine_name;
return -1; return -1;
} }
auto r = _map.insert(std::make_pair(engine_name, engine)); auto r = _map.insert(std::make_pair(engine_name, engine));
if (!r.second) { if (!r.second) {
LOG(ERROR) << "Failed insert item: " << engine_name; LOG(ERROR) << "Failed insert item: " << engine_name;
...@@ -782,7 +782,6 @@ class InferManager { ...@@ -782,7 +782,6 @@ class InferManager {
} }
LOG(WARNING) << "Succ proc initialize engine: " << engine_name; LOG(WARNING) << "Succ proc initialize engine: " << engine_name;
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册