diff --git a/mindspore/core/mindrt/src/thread/parallel_thread_pool_manager.cc b/mindspore/core/mindrt/src/thread/parallel_thread_pool_manager.cc index c9d22464f74..bc457d3820f 100644 --- a/mindspore/core/mindrt/src/thread/parallel_thread_pool_manager.cc +++ b/mindspore/core/mindrt/src/thread/parallel_thread_pool_manager.cc @@ -73,8 +73,8 @@ int ParallelThreadPoolManager::GetThreadPoolSize() { } void ParallelThreadPoolManager::BindPoolToRunner( -#ifndef MS_COMPILE_IOS ThreadPool *pool, const std::map> *config_info) { +#ifndef MS_COMPILE_IOS std::unique_lock l(pool_manager_mutex_); if (!enable_shared_thread_pool_ || config_info == nullptr) { THREAD_ERROR("not use parallel thread pool shared."); diff --git a/mindspore/lite/src/runtime/lite_session.cc b/mindspore/lite/src/runtime/lite_session.cc index 6cb33436f37..873eaa402e1 100644 --- a/mindspore/lite/src/runtime/lite_session.cc +++ b/mindspore/lite/src/runtime/lite_session.cc @@ -530,7 +530,7 @@ int LiteSession::CompileGraph(Model *model) { return ret; } ret = lite::PackWeightManager::GetInstance()->StoreOriginTensorData(model, &tensors_); - if (ret != RET_OK) { + if (MS_UNLIKELY(ret != RET_OK)) { MS_LOG(ERROR) << "StoreOriginTensorData failed."; return RET_ERROR; }