diff --git a/mindspore/lite/src/lite_session.cc b/mindspore/lite/src/lite_session.cc index 599aa9f56d779090dc7000e1f9119e9fe5c6d592..62fd380009cb8eef58f9f21da0a127f1da63c713 100644 --- a/mindspore/lite/src/lite_session.cc +++ b/mindspore/lite/src/lite_session.cc @@ -167,6 +167,7 @@ std::vector LiteSession::GetInputs() { int LiteSession::RunGraph() { MS_EXCEPTION_IF_NULL(this->context_); + SetMaxWokerNum(context_->threadNum); Executor executor; return executor.Run(this->inputs, this->outputs, this->kernels, this->context_->allocator.get()); } diff --git a/mindspore/lite/src/runtime/thread_pool.cc b/mindspore/lite/src/runtime/thread_pool.cc index e9d9c8f1dc185f9dd068e600b46d6891ba345e8e..933a49664bee9b107ca749e13996ed5e65d0f740 100644 --- a/mindspore/lite/src/runtime/thread_pool.cc +++ b/mindspore/lite/src/runtime/thread_pool.cc @@ -201,7 +201,7 @@ bool LiteThreadBind::SetCPUBind(pthread_t threadId, cpu_set_t *cpuSet) { #if __ANDROID_API__ >= 21 int ret = sched_setaffinity(pthread_gettid_np(threadId), sizeof(cpu_set_t), cpuSet); if (ret != 0) { - MS_LOG(ERROR) << "bind thread %ld to cpu failed.ERROR %d", threadId, ret; + MS_LOG(ERROR) << "bind thread " << threadId << "to cpu failed.ERROR " << ret; } #endif #else