diff --git a/mindspore/ccsrc/debug/debugger/proto_exporter.cc b/mindspore/ccsrc/debug/debugger/proto_exporter.cc index e0e9ba08fe..3eb685ef4b 100644 --- a/mindspore/ccsrc/debug/debugger/proto_exporter.cc +++ b/mindspore/ccsrc/debug/debugger/proto_exporter.cc @@ -579,7 +579,7 @@ void DumpIRProtoWithSrcInfo(const FuncGraphPtr &func_graph, const std::string &s ChangeFileMode(file_path, S_IRUSR); } #else -void DumpIRProtoWithSrcInfo(const FuncGraphPtr &, const std::string &, const std::string &) { +void DumpIRProtoWithSrcInfo(const FuncGraphPtr &, const std::string &, const std::string &, LocDebugDumpMode) { static bool already_printed = false; if (already_printed) { return; diff --git a/mindspore/ccsrc/frontend/optimizer/irpass/updatestate_eliminate.cc b/mindspore/ccsrc/frontend/optimizer/irpass/updatestate_eliminate.cc index 5eb97667cc..3c1d26d508 100644 --- a/mindspore/ccsrc/frontend/optimizer/irpass/updatestate_eliminate.cc +++ b/mindspore/ccsrc/frontend/optimizer/irpass/updatestate_eliminate.cc @@ -327,6 +327,10 @@ void EliminateUselessNodesForUpdateStates(const std::vector &update_st // If all users are Depend CNode. if (depend_nodes.size() == us_users.size()) { end = 1; + // Set abstract value for reserved Depend node. + auto &reserved_depend_node = depend_nodes[0]; + auto &primary_node = reserved_depend_node->cast()->input(kInputIndex); + reserved_depend_node->set_abstract(primary_node->abstract()); } for (ssize_t i = depend_nodes.size() - 1; i >= end; i--) { const auto &depend_node = depend_nodes[i]; diff --git a/mindspore/ccsrc/transform/express_ir/mindir_exporter.cc b/mindspore/ccsrc/transform/express_ir/mindir_exporter.cc index 929bd98286..ab25da27d6 100644 --- a/mindspore/ccsrc/transform/express_ir/mindir_exporter.cc +++ b/mindspore/ccsrc/transform/express_ir/mindir_exporter.cc @@ -382,7 +382,9 @@ void IrExportBuilder::SetShapeToNodeProto(const CNodePtr &node, mind_ir::NodePro // 3. save tuple string in ref_attr_name MS_EXCEPTION_IF_NULL(node); auto type = node->Type(); + MS_EXCEPTION_IF_NULL(type); auto shape = node->Shape(); + MS_EXCEPTION_IF_NULL(shape); ResetTupleIndex(); std::string seq_string = "shape:"; mind_ir::AttributeProto *attr_proto = node_proto->add_attribute();