From 97c510c008fd74213c9c407c5811179c8e89b3e7 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Wed, 7 Sep 2022 18:05:41 +0400 Subject: [PATCH] Fixed build for TBB which uses pre-release functions (#12947) * Fixed build for TBB which uses pre-reliase functions * Disable TBB only for macOS only * Changed condition --- .../src/threading/ie_parallel_custom_arena.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/inference/src/threading/ie_parallel_custom_arena.cpp b/src/inference/src/threading/ie_parallel_custom_arena.cpp index 151fb39d435..add8fbefdbc 100644 --- a/src/inference/src/threading/ie_parallel_custom_arena.cpp +++ b/src/inference/src/threading/ie_parallel_custom_arena.cpp @@ -12,9 +12,15 @@ # define TBBBIND_2_5_AVAILABLE 0 # endif -# define USE_TBBBIND_2_5 (TBBBIND_2_5_AVAILABLE && TBB_INTERFACE_VERSION < 12020) -# define TBB_NUMA_SUPPORT_PRESENT (TBB_INTERFACE_VERSION >= 11100) -# define TBB_HYBRID_CPUS_SUPPORT_PRESENT (TBB_INTERFACE_VERSION >= 12020) +# define USE_TBBBIND_2_5 (TBBBIND_2_5_AVAILABLE && TBB_INTERFACE_VERSION < 12020) +# define TBB_NUMA_SUPPORT_PRESENT (TBB_INTERFACE_VERSION >= 11100) +# if defined(__APPLE__) +// 2021.2 TBB doesn't export for macOS symbol: +// _ZN3tbb6detail2r131constraints_default_concurrencyERKNS0_2d111constraintsEl +# define TBB_HYBRID_CPUS_SUPPORT_PRESENT (TBB_INTERFACE_VERSION > 12020) +# else +# define TBB_HYBRID_CPUS_SUPPORT_PRESENT (TBB_INTERFACE_VERSION >= 12020) +# endif # if defined(_WIN32) || defined(_WIN64) # include