diff --git a/mindspore/ccsrc/frontend/optimizer/pattern.h b/mindspore/ccsrc/frontend/optimizer/pattern.h index 452258ff94..e4282e6ccd 100644 --- a/mindspore/ccsrc/frontend/optimizer/pattern.h +++ b/mindspore/ccsrc/frontend/optimizer/pattern.h @@ -259,7 +259,7 @@ class MatchResult { MatchResult() {} ~MatchResult() = default; void add_entry(PatternPtr pattern, AnfNodePtr node) { match_result_[pattern] = node; } - PatternNodeMap &result() { return match_result_; } + const PatternNodeMap &result() { return match_result_; } AnfNodePtr get_node(const PatternPtr &pattern); void merge(const MatchResultPtr &other_result); void clear() { match_result_.clear(); } diff --git a/mindspore/ccsrc/utils/scoped_long_running.h b/mindspore/ccsrc/utils/scoped_long_running.h index b986c8f8c9..d81592d7d8 100644 --- a/mindspore/ccsrc/utils/scoped_long_running.h +++ b/mindspore/ccsrc/utils/scoped_long_running.h @@ -21,7 +21,6 @@ #include namespace mindspore { - // Base Class for scoped long running code. // Enter() should release some global resoure, like Python GIL; // Leave() should acquire the same global resource released.