提交 fc61bf1b 编写于 作者: B baojun-nervana

Renamed methods

test=develope
上级 d5ee05e6
...@@ -111,7 +111,7 @@ std::map<std::string, ...@@ -111,7 +111,7 @@ std::map<std::string,
NgraphBridge::NG_NODE_MAP = {{"relu", BuildUnaryNode<ngraph::op::Relu>}, NgraphBridge::NG_NODE_MAP = {{"relu", BuildUnaryNode<ngraph::op::Relu>},
{"tanh", BuildUnaryNode<ngraph::op::Tanh>}}; {"tanh", BuildUnaryNode<ngraph::op::Tanh>}};
void NgraphBridge::BuildNgGraph(const std::shared_ptr<OperatorBase>& op) { void NgraphBridge::BuildNgNode(const std::shared_ptr<OperatorBase>& op) {
auto& op_type = op->Type(); auto& op_type = op->Type();
NG_NODE_MAP[op_type](op, ngb_node_map_); NG_NODE_MAP[op_type](op, ngb_node_map_);
} }
......
...@@ -43,7 +43,7 @@ class NgraphBridge { ...@@ -43,7 +43,7 @@ class NgraphBridge {
var_node_map) var_node_map)
: ngb_node_map_(var_node_map) {} : ngb_node_map_(var_node_map) {}
void BuildNgGraph(const std::shared_ptr<OperatorBase>& op); void BuildNgNode(const std::shared_ptr<OperatorBase>& op);
private: private:
std::shared_ptr< std::shared_ptr<
......
...@@ -122,7 +122,7 @@ class NgraphOperator { ...@@ -122,7 +122,7 @@ class NgraphOperator {
// get ngraph input and define ngraph input parameters // get ngraph input and define ngraph input parameters
void GetNgInputShape(std::shared_ptr<OperatorBase> op); void GetNgInputShape(std::shared_ptr<OperatorBase> op);
// Call ngraph bridge to map ops // Call ngraph bridge to map ops
void BuildNgNode(); void BuildNgNodes();
// get the ngraph input and output var list // get the ngraph input and output var list
void BuildNgIO(); void BuildNgIO();
// build ngraph function call // build ngraph function call
...@@ -301,7 +301,7 @@ void NgraphOperator::GetNgInputShape(std::shared_ptr<OperatorBase> op) { ...@@ -301,7 +301,7 @@ void NgraphOperator::GetNgInputShape(std::shared_ptr<OperatorBase> op) {
} }
} }
void NgraphOperator::BuildNgNode() { void NgraphOperator::BuildNgNodes() {
for (auto& var_name : var_out_) { for (auto& var_name : var_out_) {
if (var_node_map_->find(var_name) == var_node_map_->end()) { if (var_node_map_->find(var_name) == var_node_map_->end()) {
auto* var = scope_.FindVar(var_name); auto* var = scope_.FindVar(var_name);
...@@ -319,7 +319,7 @@ void NgraphOperator::BuildNgNode() { ...@@ -319,7 +319,7 @@ void NgraphOperator::BuildNgNode() {
paddle::framework::NgraphBridge ngb(var_node_map_); paddle::framework::NgraphBridge ngb(var_node_map_);
for (auto& op : fused_ops_) { for (auto& op : fused_ops_) {
ngb.BuildNgGraph(op); ngb.BuildNgNode(op);
} }
} }
...@@ -396,7 +396,7 @@ void NgraphOperator::BuildNgIO() { ...@@ -396,7 +396,7 @@ void NgraphOperator::BuildNgIO() {
} }
void NgraphOperator::BuildNgFunction() { void NgraphOperator::BuildNgFunction() {
BuildNgNode(); BuildNgNodes();
ngraph_function_ = nullptr; ngraph_function_ = nullptr;
ngraph::NodeVector func_outputs; ngraph::NodeVector func_outputs;
ngraph::op::ParameterVector func_inputs; ngraph::op::ParameterVector func_inputs;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册