Tune test case for hybrid cpu (#14204)

Tune test case for hybrid cpu architecture.

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
This commit is contained in:
RandySheriffH 2023-01-10 12:54:02 -08:00 committed by GitHub
parent 90142899bd
commit d152452d4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -608,7 +608,8 @@ TEST(ThreadPoolTest, TestAffinityStringWellShaped) {
auto non_default_tp = concurrency::CreateThreadPool(&onnxruntime::Env::Default(),
tp_params,
concurrency::ThreadPoolType::INTRA_OP);
ASSERT_TRUE(concurrency::ThreadPool::DegreeOfParallelism(non_default_tp.get()) == 3);
auto DOP = concurrency::ThreadPool::DegreeOfParallelism(non_default_tp.get());
ASSERT_TRUE(DOP >= 3 && DOP % 3 == 0); // for hybrid cpu, dop is a multiple of 3
}
}