fix remove front cast error
This commit is contained in:
parent
22d683a805
commit
a3760b5b2d
|
@ -54,6 +54,9 @@ const AnfNodePtr RemoveInternalOutput::Process(const FuncGraphPtr &func_graph, c
|
|||
const EquivPtr &) const {
|
||||
MS_EXCEPTION_IF_NULL(func_graph);
|
||||
MS_EXCEPTION_IF_NULL(node);
|
||||
if (AnfAlgo::CheckPrimitiveType(node, prim::kPrimCast) && !AnfAlgo::GetBooleanAttr(node, kIsBackendCast)) {
|
||||
return nullptr;
|
||||
}
|
||||
auto kernel_graph = func_graph->cast<KernelGraphPtr>();
|
||||
if (kernel_graph == nullptr) {
|
||||
return nullptr;
|
||||
|
|
|
@ -106,12 +106,14 @@ void BuildGraphTask::Run() {
|
|||
void RunGraphTask::Run() {
|
||||
MS_EXCEPTION_IF_NULL(session_);
|
||||
try {
|
||||
MS_LOG(INFO) << "Start run graph " << graph_id_;
|
||||
auto graph = session_->GetGraph(graph_id_);
|
||||
MS_EXCEPTION_IF_NULL(graph);
|
||||
graph->ResetGraphRunningStatus();
|
||||
session_->RunGraphImpl(graph_id_, input_tensors_, &outputs_);
|
||||
graph->OnRunGraphFinished();
|
||||
UpdateOutputTensors(&outputs_, tensor_to_node_);
|
||||
MS_LOG(INFO) << "End run graph " << graph_id_;
|
||||
} catch (const std::exception &e) {
|
||||
MsException::GetInstance().SetException();
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ LinConvertResult MsBackend::MsConvert(const GraphSegmentPtr &segment, const std:
|
|||
MS_EXCEPTION_IF_NULL(pre_graph);
|
||||
pre_graph->AddPostGraph(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)) {
|
||||
|
|
Loading…
Reference in New Issue