未验证 提交 e8e12499 编写于 作者: 石晓伟 提交者: GitHub

fix multi-thread error of fc_gru_fuse_pass.cc, test=develop (#21841) (#22185)

* fix multi-thread error of fc_gru_fuse_pass.cc, test=develop

* export FLAGS and GLOG symbols, test=develop
上级 91706d3b
...@@ -93,7 +93,11 @@ static int BuildFusion(Graph* graph, const std::string& name_scope, ...@@ -93,7 +93,11 @@ static int BuildFusion(Graph* graph, const std::string& name_scope,
#undef GET_NODE #undef GET_NODE
#define NEW_IMTERMEDIATE_OUT(key) \ #define NEW_IMTERMEDIATE_OUT(key) \
scope.Var(NEW_NAME(key))->GetMutable<framework::LoDTensor>() VarDesc key(NEW_NAME(key)); \
key.SetPersistable(false); \
auto* key##_node = graph->CreateVarNode(&key); \
IR_NODE_LINK_TO(op, key##_node);
NEW_IMTERMEDIATE_OUT(ReorderedH0); NEW_IMTERMEDIATE_OUT(ReorderedH0);
NEW_IMTERMEDIATE_OUT(XX); NEW_IMTERMEDIATE_OUT(XX);
NEW_IMTERMEDIATE_OUT(BatchedInput); NEW_IMTERMEDIATE_OUT(BatchedInput);
......
...@@ -31,7 +31,7 @@ DEFINE_string( ...@@ -31,7 +31,7 @@ DEFINE_string(
"'<space splitted floats as data>\t<space splitted ints as shape'"); "'<space splitted floats as data>\t<space splitted ints as shape'");
DEFINE_bool(use_gpu, false, "Whether use gpu."); DEFINE_bool(use_gpu, false, "Whether use gpu.");
#ifdef PADDLE_WITH_SHARED_LIB #ifdef PADDLE_WITH_SHARED_LIB
DEFINE_bool(profile, false, "Whether use profile."); DECLARE_bool(profile);
#endif #endif
namespace paddle { namespace paddle {
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
global: global:
*paddle*; *paddle*;
*Pass*; *Pass*;
*profile*; extern "C++" {
fL*::*;
};
local: local:
*; *;
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册