!24297 [lite]code review part9

Merge pull request !24297 from 徐安越/master_core
This commit is contained in:
i-robot 2021-10-11 10:16:40 +00:00 committed by Gitee
commit e95dd00a68
3 changed files with 9 additions and 9 deletions

View File

@ -75,7 +75,7 @@ bool PassManager::Run(const FuncGraphPtr &func_graph, const std::vector<PassPtr>
#endif
num++;
} else {
MS_LOG(INFO) << "pass " << pass->name() << "is null";
MS_LOG(INFO) << "pass is null";
}
}
return changed;

View File

@ -59,12 +59,12 @@ const AnfNodePtr AffineActivationFusion::Process(const FuncGraphPtr &func_graph,
return nullptr;
}
auto affine_node = pre_node->cast<CNodePtr>();
if (IsMarkedTrainOp(affine_node)) {
if (affine_node == nullptr) {
MS_LOG(ERROR) << "the affine_node is null.";
lite::ReturnCode::GetSingleReturnCode()->UpdateReturnCode(lite::RET_NULL_PTR);
return nullptr;
}
if (pre_node == nullptr) {
MS_LOG(ERROR) << "the splice_node is null.";
lite::ReturnCode::GetSingleReturnCode()->UpdateReturnCode(lite::RET_NULL_PTR);
if (IsMarkedTrainOp(affine_node)) {
return nullptr;
}
auto affine_prim = GetValueNode<std::shared_ptr<ops::Affine>>(affine_node->input(kAnfPrimitiveIndex));

View File

@ -68,14 +68,14 @@ const AnfNodePtr AffineFusion::Process(const FuncGraphPtr &func_graph, const Anf
return nullptr;
}
auto splice_node = pre_node->cast<CNodePtr>();
if (IsMarkedTrainOp(splice_node)) {
return nullptr;
}
if (pre_node == nullptr) {
if (splice_node == nullptr) {
MS_LOG(ERROR) << "the splice_node is null.";
lite::ReturnCode::GetSingleReturnCode()->UpdateReturnCode(lite::RET_NULL_PTR);
return nullptr;
}
if (IsMarkedTrainOp(splice_node)) {
return nullptr;
}
auto splice_prim = GetValueNode<std::shared_ptr<ops::Splice>>(splice_node->input(kAnfPrimitiveIndex));
MS_ASSERT(prim != nullptr);
/**