OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
Fail cmake configuration step in case selected threading (TBB/OMP) strategy has failed (#32240)
Arseniy Obolenskiy7a2cf48831be
diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.ymlindex 2f8510439c6..a0f832a27a6 100644--- a/.github/workflows/clang_tidy.yml+++ b/.github/workflows/clang_tidy.yml@@ -295,6 +295,7 @@ jobs:-DCMAKE_RULE_MESSAGES=OFF \-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \+ -DTHREADING=SEQ \-S ${OPENVINO_REPO} \-B ${BUILD_DIR}diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.ymlindex dc59e598bc8..1b0eb507d7d 100644--- a/.github/workflows/code_style.yml+++ b/.github/workflows/code_style.yml@@ -142,7 +142,7 @@ jobs:submodules: 'true'- name: CMake configure- run: cmake -DENABLE_CLANG_FORMAT=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/riscv64.linux.toolchain.cmake -B build_riscv64+ run: cmake -DENABLE_CLANG_FORMAT=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT -DTHREADING=SEQ -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/riscv64.linux.toolchain.cmake -B build_riscv64- name: Create code style diffrun: cmake --build build_riscv64 --target clang_format_fix_all -j8diff --git a/.github/workflows/debian_10_arm.yml b/.github/workflows/debian_10_arm.ymlindex f3ca96eb66b..c29ffb000dd 100644--- a/.github/workflows/debian_10_arm.yml+++ b/.github/workflows/debian_10_arm.yml@@ -111,6 +111,7 @@ jobs:-DENABLE_LTO=ON-DENABLE_TESTS=ON-DENABLE_PYTHON=OFF+ -DTHREADING=SEQ-DCMAKE_TOOLCHAIN_FILE=cmake/arm.toolchain.cmakeCXX_Unit_Tests:diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.ymlindex 4e8c8f96462..c9726f578d0 100644--- a/.github/workflows/webassembly.yml+++ b/.github/workflows/webassembly.yml@@ -120,6 +120,7 @@ jobs:-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \+ -DTHREADING=SEQ \-S ${OPENVINO_REPO} \-B ${OPENVINO_BUILD_DIR}diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmakeindex 7475a558584..9f29ffc68e8 100644--- a/cmake/dependencies.cmake+++ b/cmake/dependencies.cmake@@ -15,9 +15,10 @@ if(THREADING STREQUAL "OMP")find_package(OpenMP)if(NOT OpenMP_CXX_FOUND)- message(WARNING "Compiler does not support OpenMP standard. Falling back to SEQ threading")- set(THREADING "SEQ")set(ENABLE_INTEL_OPENMP OFF)+ message(DEPRECATION "Support for automatically falling back to SEQ threading when OpenMP is unavailable is deprecated and will be removed in a future release. "+ "CMake configuration now fails if the compiler does not support OpenMP. "+ "Please explicitly set -DTHREADING=SEQ to continue without OpenMP.")endif()if(ENABLE_INTEL_OPENMP)diff --git a/src/cmake/ov_parallel.cmake b/src/cmake/ov_parallel.cmakeindex 509d243a0da..0362d003520 100644--- a/src/cmake/ov_parallel.cmake+++ b/src/cmake/ov_parallel.cmake@@ -253,10 +253,7 @@ macro(ov_find_package_tbb)endif()if(NOT TBB_FOUND)- set(THREADING "SEQ")- set(ENABLE_TBBBIND_2_5 OFF)- message(WARNING "TBB was not found by the configured TBB_DIR / TBBROOT path.\- SEQ method will be used.")+ message(FATAL_ERROR "TBB was not found by the configured TBB_DIR / TBBROOT path. Use -DTHREADING=SEQ instead.")else()message(STATUS "TBB (${TBB_VERSION}) is found at ${TBB_DIR}")endif()@@ -392,9 +389,7 @@ function(ov_set_threading_interface_for TARGET_NAME)endif()set(_ov_threading_lib TBB::tbb)else()- set(THREADING "SEQ" PARENT_SCOPE)- message(WARNING "TBB was not found by the configured TBB_DIR path.\- SEQ method will be used for ${TARGET_NAME}")+ message(FATAL_ERROR "TBB was not found by the configured TBB_DIR path. Use -DTHREADING=SEQ instead")endif()elseif(THREADING STREQUAL "OMP")ov_find_package_openmp()