[MSLITE] fix ci test timeout

This commit is contained in:
wang_shaocong 2021-09-07 19:33:10 +08:00
parent 394dfc07bc
commit 66c46a5ee1
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;