!23032 [MSLITE] Fix ci test timeout.

Merge pull request !23032 from wangshaocong/bugfix_ci
This commit is contained in:
i-robot 2021-09-08 01:31:23 +00:00 committed by Gitee
commit 15189a7f8c
3 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,7 @@
namespace mindspore {
constexpr int kDefaultSpinCount = 300000;
constexpr int kMinSpinCount = 3000;
constexpr int kDefaultFrequency = 1;
constexpr float kMaxScale = 1.;

View File

@ -62,7 +62,7 @@ int Executor::Run(const std::vector<Tensor *> &in_tensors, const std::vector<Ten
}
// reset the max spin count.
status = thread_pool->SetMaxSpinCount(0);
status = thread_pool->SetMaxSpinCount(kMinSpinCount);
if (status != RET_OK) {
MS_LOG(ERROR) << "Set max spin count failed.";
return status;

View File

@ -193,7 +193,7 @@ int MindrtExecutor::Run(const std::vector<Tensor *> &in_tensors, const std::vect
TransferGraphOutput();
// reset the max spin count.
ret = thread_pool->SetMaxSpinCount(0);
ret = thread_pool->SetMaxSpinCount(kMinSpinCount);
if (ret != RET_OK) {
MS_LOG(ERROR) << "Set max spin count failed.";
return ret;