Browse Source

!9325 Fix some nodes' locations miss line

From: @irmo
Reviewed-by: @zh_qh,@ginfung
Signed-off-by: @zh_qh
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
3fd4a51680
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      mindspore/ccsrc/pipeline/jit/parse/parse.cc

+ 5
- 2
mindspore/ccsrc/pipeline/jit/parse/parse.cc View File

@@ -752,8 +752,11 @@ AnfNodePtr Parser::ParseAttribute(const FunctionBlockPtr &block, const py::objec
// process the node attr
auto attr_str = python_adapter::GetPyObjAttr(node, "attr").cast<std::string>();
MS_LOG(DEBUG) << "Attr = " << attr_str;
TraceGuard guard(GetLocation(python_adapter::GetPyObjAttr(node, "attr")));
AnfNodePtr attr_node = NewValueNode(attr_str);
AnfNodePtr attr_node = nullptr;
{
TraceGuard guard(GetLocation(python_adapter::GetPyObjAttr(node, "attr")));
attr_node = NewValueNode(attr_str);
}

// create the apply node
return block->func_graph()->NewCNode({op_node, value_node, attr_node});


Loading…
Cancel
Save