fix some potential risk

This commit is contained in:
lby 2022-02-10 20:12:26 +08:00
parent 3117737755
commit cc95ce6dc3
3 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ bool TbeAdapter::GetSpecDataInput(const FusionScopeInfo &fusion_scope_info,
auto ccompute_node = compute_node->cast<CNodePtr>();
if (ccompute_node == nullptr) {
MS_LOG(WARNING) << "Fusion error: fusion compute node must be cnode, but the node is "
<< ccompute_node->DebugString();
<< compute_node->DebugString();
return false;
}
for (size_t i = 1; i < ccompute_node->inputs().size(); ++i) {

View File

@ -100,7 +100,7 @@ bool FusionBuildTbeJsonCreator::CheckInput(const FusionScopeInfo &fusion_scope_i
MS_EXCEPTION_IF_NULL(node);
auto cnode = node->cast<CNodePtr>();
if (cnode == nullptr) {
MS_LOG(WARNING) << "Fusion Error: fusion compute node must be cnode, but the node is " << cnode->DebugString();
MS_LOG(WARNING) << "Fusion Error: fusion compute node must be cnode, but the node is " << node->DebugString();
return false;
}
for (size_t i = 1; i < cnode->inputs().size(); ++i) {

View File

@ -377,7 +377,7 @@ void AscendDeviceContext::PreprocessBeforeRunGraph(const KernelGraphPtr &graph)
}
} catch (const std::exception &e) {
ReportErrorMessage();
MS_LOG(EXCEPTION) << "Preprocess failed before run graph " << graph->graph_id();
MS_LOG(EXCEPTION) << "Preprocess failed before run graph: " << graph->graph_id() << ", error msg: " << e.what();
}
MS_LOG(INFO) << "Status record: end preprocess before run graph. graph id: " << graph->graph_id();