From: @kisnwang Reviewed-by: @limingqi107,@chujinjin Signed-off-by: @chujinjintags/v1.1.0
| @@ -54,6 +54,9 @@ const AnfNodePtr RemoveInternalOutput::Process(const FuncGraphPtr &func_graph, c | |||||
| const EquivPtr &) const { | const EquivPtr &) const { | ||||
| MS_EXCEPTION_IF_NULL(func_graph); | MS_EXCEPTION_IF_NULL(func_graph); | ||||
| MS_EXCEPTION_IF_NULL(node); | MS_EXCEPTION_IF_NULL(node); | ||||
| if (AnfAlgo::CheckPrimitiveType(node, prim::kPrimCast) && !AnfAlgo::GetBooleanAttr(node, kIsBackendCast)) { | |||||
| return nullptr; | |||||
| } | |||||
| auto kernel_graph = func_graph->cast<KernelGraphPtr>(); | auto kernel_graph = func_graph->cast<KernelGraphPtr>(); | ||||
| if (kernel_graph == nullptr) { | if (kernel_graph == nullptr) { | ||||
| return nullptr; | return nullptr; | ||||
| @@ -106,12 +106,14 @@ void BuildGraphTask::Run() { | |||||
| void RunGraphTask::Run() { | void RunGraphTask::Run() { | ||||
| MS_EXCEPTION_IF_NULL(session_); | MS_EXCEPTION_IF_NULL(session_); | ||||
| try { | try { | ||||
| MS_LOG(INFO) << "Start run graph " << graph_id_; | |||||
| auto graph = session_->GetGraph(graph_id_); | auto graph = session_->GetGraph(graph_id_); | ||||
| MS_EXCEPTION_IF_NULL(graph); | MS_EXCEPTION_IF_NULL(graph); | ||||
| graph->ResetGraphRunningStatus(); | graph->ResetGraphRunningStatus(); | ||||
| session_->RunGraphImpl(graph_id_, input_tensors_, &outputs_); | session_->RunGraphImpl(graph_id_, input_tensors_, &outputs_); | ||||
| graph->OnRunGraphFinished(); | graph->OnRunGraphFinished(); | ||||
| UpdateOutputTensors(&outputs_, tensor_to_node_); | UpdateOutputTensors(&outputs_, tensor_to_node_); | ||||
| MS_LOG(INFO) << "End run graph " << graph_id_; | |||||
| } catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
| MsException::GetInstance().SetException(); | MsException::GetInstance().SetException(); | ||||
| } | } | ||||
| @@ -76,6 +76,7 @@ LinConvertResult MsBackend::MsConvert(const GraphSegmentPtr &segment, const std: | |||||
| MS_EXCEPTION_IF_NULL(pre_graph); | MS_EXCEPTION_IF_NULL(pre_graph); | ||||
| pre_graph->AddPostGraph(graph); | pre_graph->AddPostGraph(graph); | ||||
| graph->AddPreGraph(pre_graph); | graph->AddPreGraph(pre_graph); | ||||
| MS_LOG(INFO) << "Link graph " << pre_segment->graph_id_ << " to " << graph_id; | |||||
| } | } | ||||
| if (MsContext::GetInstance()->get_param<bool>(MS_CTX_PRECOMPILE_ONLY)) { | if (MsContext::GetInstance()->get_param<bool>(MS_CTX_PRECOMPILE_ONLY)) { | ||||