提交 8342f12e 编写于 作者: Q Qiao Longfei

fix set remote_prefetch test=develop

上级 df45c8c5
...@@ -81,10 +81,6 @@ void ProcessGraph(std::vector<ir::Graph *> graphs, Scope *scope) { ...@@ -81,10 +81,6 @@ void ProcessGraph(std::vector<ir::Graph *> graphs, Scope *scope) {
nodes_to_delete.push_back(node); nodes_to_delete.push_back(node);
VLOG(3) << "find and remove an recv op: " VLOG(3) << "find and remove an recv op: "
<< recv_varname_to_ctx[recv_var_name]; << recv_varname_to_ctx[recv_var_name];
} else if (node->Name() == "lookup_table" || node->Name() == "nce" ||
node->Name() == "hierarchical_sigmoid") {
VLOG(0) << "set " << node->Name() << " op remote_prefetch to false";
node->Op()->SetAttr("remote_prefetch", false);
} }
} }
} }
......
...@@ -127,8 +127,13 @@ class AsyncSSAGraphBuilder : public MultiDevSSAGraphBuilderBase { ...@@ -127,8 +127,13 @@ class AsyncSSAGraphBuilder : public MultiDevSSAGraphBuilderBase {
bool DealWithSpecialOp(ir::Graph *result, ir::Node *node) const override { bool DealWithSpecialOp(ir::Graph *result, ir::Node *node) const override {
if (node->Op()->Type() == "recv") { if (node->Op()->Type() == "recv") {
VLOG(0) << "set recv op do_not_run to true";
node->Op()->SetAttr("do_not_run", true); node->Op()->SetAttr("do_not_run", true);
node->Op()->Flush(); node->Op()->Flush();
} else if (node->Name() == "lookup_table" || node->Name() == "nce" ||
node->Name() == "hierarchical_sigmoid") {
VLOG(0) << "set " << node->Name() << " op remote_prefetch to false";
node->Op()->SetAttr("remote_prefetch", false);
} }
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册