From 6fbc44f307068367bef029f760e26058147b6d1b Mon Sep 17 00:00:00 2001 From: Fang Xu Date: Wed, 22 May 2024 13:21:12 +0800 Subject: [PATCH] update tbbbind library for 2022.3 (#23740) ### Details: - *BDBA scan detect hwloc2.5.0 one medium problem* ### Tickets: - *CVS-135425* --------- Co-authored-by: Chen Peter --- cmake/dependencies.cmake | 5 +++-- src/inference/src/threading/ie_cpu_streams_executor.cpp | 5 ++++- .../behavior/ov_executable_network/properties.cpp | 9 ++++++++- .../behavior/ov_plugin/core_integration.cpp | 4 ++++ .../behavior/plugin/configuration_tests.cpp | 9 ++++++++- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 538501624a5..1d8e46ce937 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -187,10 +187,11 @@ function(ov_download_tbbbind_2_5) SHA256 "a67afeea8cf194f97968c800dab5b5459972908295242e282045d6b8953573c1") elseif(LINUX AND X86_64) RESOLVE_DEPENDENCY(TBBBIND_2_5 - ARCHIVE_LIN "tbbbind_2_5_static_lin_v2.tgz" + ARCHIVE_LIN "tbbbind_2_5_static_lin_v4.tgz" TARGET_PATH "${TEMP}/tbbbind_2_5" ENVIRONMENT "TBBBIND_2_5_ROOT" - SHA256 "865e7894c58402233caf0d1b288056e0e6ab2bf7c9d00c9dc60561c484bc90f4") + SHA256 "4ebf30246530795f066fb9616e6707c6b17be7a65d29d3518b578a769dd54eea" + USE_NEW_LOCATION TRUE) else() # TMP: for Apple Silicon TBB does not provide TBBBind if(NOT (APPLE AND AARCH64)) diff --git a/src/inference/src/threading/ie_cpu_streams_executor.cpp b/src/inference/src/threading/ie_cpu_streams_executor.cpp index 146e93687be..e065ae272c2 100644 --- a/src/inference/src/threading/ie_cpu_streams_executor.cpp +++ b/src/inference/src/threading/ie_cpu_streams_executor.cpp @@ -139,10 +139,13 @@ struct CPUStreamsExecutor::Impl { // Prevent conflicts with system scheduling, so default cpu id on big core starts from 1 ? (small_core ? small_core_offset : (logic_core ? 0 : 1)) : 0; - +# ifdef _WIN32 _taskArena.reset(new custom::task_arena{custom::task_arena::constraints{} .set_core_type(selected_core_type) .set_max_concurrency(max_concurrency)}); +# else + _taskArena.reset(new custom::task_arena{max_concurrency}); +# endif CpuSet processMask; int ncpus = 0; std::tie(processMask, ncpus) = GetProcessMask(); diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp index 608a80f7b91..a458f7afa3f 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_executable_network/properties.cpp @@ -76,7 +76,14 @@ auto default_affinity = [] { } }(); #else -auto default_affinity = ov::Affinity::CORE; +auto default_affinity = [] { + auto coreTypes = InferenceEngine::getAvailableCoresTypes(); + if (coreTypes.size() > 1) { + return ov::Affinity::HYBRID_AWARE; + } else { + return ov::Affinity::CORE; + } +}(); #endif const std::vector default_properties = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index e8308b7ad08..3119e6a5299 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -209,6 +209,10 @@ TEST(OVClassBasicTest, smoke_SetConfigAffinity) { } #else auto defaultBindThreadParameter = ov::Affinity::CORE; + auto coreTypes = InferenceEngine::getAvailableCoresTypes(); + if (coreTypes.size() > 1) { + defaultBindThreadParameter = ov::Affinity::HYBRID_AWARE; + } #endif OV_ASSERT_NO_THROW(value = ie.get_property("CPU", ov::affinity)); ASSERT_EQ(defaultBindThreadParameter, value); diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/plugin/configuration_tests.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/plugin/configuration_tests.cpp index ee9361745c8..27368152408 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/plugin/configuration_tests.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/behavior/plugin/configuration_tests.cpp @@ -22,7 +22,14 @@ namespace { } }()}; #else - auto defaultBindThreadParameter = InferenceEngine::Parameter{std::string{CONFIG_VALUE(YES)}}; + auto defaultBindThreadParameter = InferenceEngine::Parameter{[] { + auto coreTypes = InferenceEngine::getAvailableCoresTypes(); + if (coreTypes.size() > 1) { + return std::string{CONFIG_VALUE(HYBRID_AWARE)}; + } else { + return std::string{CONFIG_VALUE(YES)}; + } + }()}; #endif INSTANTIATE_TEST_SUITE_P(