diff --git a/include/api/graph.h b/include/api/graph.h index 42ca2c85ba..9373f573e6 100644 --- a/include/api/graph.h +++ b/include/api/graph.h @@ -30,6 +30,7 @@ class MS_API Graph { class GraphData; explicit Graph(const std::shared_ptr &graph_data); explicit Graph(std::shared_ptr &&graph_data); + ~Graph(); enum ModelType ModelType() const; diff --git a/mindspore/_check_version.py b/mindspore/_check_version.py index 58d3088c67..e5697ed22d 100644 --- a/mindspore/_check_version.py +++ b/mindspore/_check_version.py @@ -190,15 +190,21 @@ class AscendEnvChecker(EnvChecker): "match, reference to the match info on: https://www.mindspore.cn/install") def check_deps_version(self): - # in order to update the change of 'LD_LIBRARY_PATH' env, run a sub process + """ + te, topi, hccl wheel package version check + in order to update the change of 'LD_LIBRARY_PATH' env, run a sub process + """ input_args = ["--mindspore_version=" + __version__] for v in self.version: input_args.append("--supported_version=" + v) deps_version_checker = os.path.join(os.path.split(os.path.realpath(__file__))[0], "_check_deps_version.py") call_cmd = [sys.executable, deps_version_checker] + input_args - process = subprocess.run(call_cmd, timeout=300, text=True, capture_output=True, check=False) - if process.stdout.strip() != "": - logger.warning(process.stdout.strip()) + try: + process = subprocess.run(call_cmd, timeout=3, text=True, capture_output=True, check=False) + if process.stdout.strip() != "": + logger.warning(process.stdout.strip()) + except subprocess.TimeoutExpired: + logger.warning("Package te, topi, hccl version check timed out, skip.") def set_env(self): if not self.tbe_path: diff --git a/mindspore/ccsrc/cxx_api/context.cc b/mindspore/ccsrc/cxx_api/context.cc index 464fc5c20f..6af1915bfb 100644 --- a/mindspore/ccsrc/cxx_api/context.cc +++ b/mindspore/ccsrc/cxx_api/context.cc @@ -20,6 +20,7 @@ namespace mindspore::api { class Context::ContextImpl { public: ContextImpl() : device_target_("NotSet"), device_id_(0) {} + ~ContextImpl() = default; const std::string &GetDeviceTarget() const { return device_target_; } void SetDeviceTarget(std::string_view device_target) { device_target_ = device_target; } uint32_t GetDeviceID() const { return device_id_; } diff --git a/mindspore/ccsrc/cxx_api/graph/graph.cc b/mindspore/ccsrc/cxx_api/graph/graph.cc index dfd372d4fc..902bbcabb0 100644 --- a/mindspore/ccsrc/cxx_api/graph/graph.cc +++ b/mindspore/ccsrc/cxx_api/graph/graph.cc @@ -22,6 +22,8 @@ Graph::Graph(const std::shared_ptr &graph_data) : graph_data_(graph_d Graph::Graph(std::shared_ptr &&graph_data) : graph_data_(graph_data) {} +Graph::~Graph() {} + ModelType Graph::ModelType() const { MS_EXCEPTION_IF_NULL(graph_data_); return graph_data_->ModelType(); diff --git a/mindspore/ccsrc/cxx_api/graph/graph_data.cc b/mindspore/ccsrc/cxx_api/graph/graph_data.cc index e6ef8f5265..a1092e21b1 100644 --- a/mindspore/ccsrc/cxx_api/graph/graph_data.cc +++ b/mindspore/ccsrc/cxx_api/graph/graph_data.cc @@ -53,6 +53,8 @@ Graph::GraphData::GraphData(Buffer om_data, enum ModelType model_type) #endif } +Graph::GraphData::~GraphData() {} + FuncGraphPtr Graph::GraphData::GetFuncGraph() const { if (model_type_ != ModelType::kMindIR) { MS_LOG(ERROR) << "Invalid ModelType " << model_type_; diff --git a/mindspore/ccsrc/cxx_api/graph/graph_data.h b/mindspore/ccsrc/cxx_api/graph/graph_data.h index f52421d654..7e7a2ac9c5 100644 --- a/mindspore/ccsrc/cxx_api/graph/graph_data.h +++ b/mindspore/ccsrc/cxx_api/graph/graph_data.h @@ -33,6 +33,8 @@ class Graph::GraphData { GraphData(Buffer om_data, enum ModelType model_type); + ~GraphData(); + enum ModelType ModelType() const { return model_type_; } FuncGraphPtr GetFuncGraph() const;