diff --git a/ge/graph/common/transop_util.cc b/ge/graph/common/transop_util.cc index c86e69dd..9b513fe6 100755 --- a/ge/graph/common/transop_util.cc +++ b/ge/graph/common/transop_util.cc @@ -85,8 +85,8 @@ bool TransOpUtil::CheckPrecisionLoss(const ge::NodePtr &src_node) { std::string TransOpUtil::TransopMapToString() { std::string buffer; - for (auto it = transop_index_map_.begin(); it != transop_index_map_.end(); ++it) { - buffer += it->first + " "; + for (auto &key : Instance().transop_index_map_) { + buffer += key.first + " "; } return buffer; } diff --git a/ge/graph/common/transop_util.h b/ge/graph/common/transop_util.h index 6284f754..3332e1fb 100644 --- a/ge/graph/common/transop_util.h +++ b/ge/graph/common/transop_util.h @@ -35,7 +35,7 @@ class GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY TransOpUtil { static bool CheckPrecisionLoss(const NodePtr &src_node); - std::string TransopMapToString(); + static std::string TransopMapToString(); private: TransOpUtil();