From d152452d4b02cff90138dc2f92b5f49ca003a47b Mon Sep 17 00:00:00 2001 From: RandySheriffH <48490400+RandySheriffH@users.noreply.github.com> Date: Tue, 10 Jan 2023 12:54:02 -0800 Subject: [PATCH] Tune test case for hybrid cpu (#14204) Tune test case for hybrid cpu architecture. Co-authored-by: Randy Shuai --- onnxruntime/test/platform/threadpool_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/test/platform/threadpool_test.cc b/onnxruntime/test/platform/threadpool_test.cc index 5c989fe3a8..a6ee8c315f 100644 --- a/onnxruntime/test/platform/threadpool_test.cc +++ b/onnxruntime/test/platform/threadpool_test.cc @@ -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 } }