Use TBB as default threading (#12783)

* Use TBB as default threading

* Use custom TBBConfigs only if TBBROOT is passed
This commit is contained in:
Ilya Lavrenov
2022-08-29 12:21:59 +04:00
committed by GitHub
parent fc4efa2460
commit ee86968bbb
3 changed files with 10 additions and 10 deletions

View File

@@ -144,7 +144,8 @@ function(ov_download_tbb)
ENVIRONMENT "TBBROOT"
SHA256 "ad9cf52e657660058aa6c6844914bc0fc66241fec89a392d8b79a7ff69c3c7f6")
else()
message(FATAL_ERROR "TBB is not available on current platform")
message(WARNING "TBB is not available on current platform")
return()
endif()
update_deps_cache(TBBROOT "${TBB}" "Path to TBB root folder")

View File

@@ -50,19 +50,14 @@ ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
#
# "OneDNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
if(X86 OR ARM OR (MSVC AND (ARM OR AARCH64)) )
set(THREADING_DEFAULT "SEQ")
else()
set(THREADING_DEFAULT "TBB")
endif()
set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading")
set(THREADING "TBB" CACHE STRING "Threading")
set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
list (APPEND IE_OPTIONS THREADING)
if (NOT THREADING STREQUAL "TBB" AND
NOT THREADING STREQUAL "TBB_AUTO" AND
NOT THREADING STREQUAL "OMP" AND
NOT THREADING STREQUAL "SEQ")
message(FATAL_ERROR "THREADING should be set to TBB, TBB_AUTO, OMP or SEQ. Default option is ${THREADING_DEFAULT}")
message(FATAL_ERROR "THREADING should be set to TBB (default), TBB_AUTO, OMP or SEQ")
endif()
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND