Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Update TBB target paths to be platform-specific in CMake (#31302)

Arseniy Obolenskiyb11ac1cfbf42
diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml
index fc1a11d036a..bd376339fc9 100644
--- a/.github/workflows/linux_conditional_compilation.yml
+++ b/.github/workflows/linux_conditional_compilation.yml
@@ -223,7 +223,7 @@ jobs:
tar -cvf - install_dependencies/install_openvino_dependencies.sh | pigz > ${BUILD_DIR}/openvino_package.tar.gz
popd
- cp -v ${OPENVINO_REPO}/temp/tbb/lib/lib* ${INSTALL_TEST_DIR}/tests
+ cp -v ${OPENVINO_REPO}/temp/Linux_x86_64/tbb/lib/lib* ${INSTALL_TEST_DIR}/tests
pushd ${INSTALL_TEST_DIR}
tar -cvf - \
tests/ov_cpu_func_tests \
diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml
index bccc1b427c1..2531fcb5bcb 100644
--- a/.github/workflows/windows_conditional_compilation.yml
+++ b/.github/workflows/windows_conditional_compilation.yml
@@ -209,13 +209,13 @@ jobs:
- name: Ctest - OpenVINO unit tests
shell: cmd
run: |
- set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
+ set path=%path%;${{ env.OPENVINO_REPO }}\temp\Windows_AMD64\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
ctest -C ${{ env.CMAKE_BUILD_TYPE }} --test-dir ${{ env.BUILD_DIR }} -V -L UNIT
- name: Perform code tracing via ITT collector
shell: cmd
run: |
- set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
+ set path=%path%;${{ env.OPENVINO_REPO }}\temp\Windows_AMD64\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
python3 ${{ env.OPENVINO_REPO }}\thirdparty\itt_collector\runtool\sea_runtool.py ^
--bindir ${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.CMAKE_BUILD_TYPE }} ^
@@ -395,7 +395,7 @@ jobs:
- name: Run with CC-ed runtime
shell: cmd
run: |
- set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
+ set path=%path%;${{ env.OPENVINO_REPO }}\temp\Windows_AMD64\tbb\bin;${{ env.BUILD_DIR }}\bin\${{ env.CMAKE_BUILD_TYPE }}
${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.CMAKE_BUILD_TYPE }}\benchmark_app.exe -niter 1 -nireq 1 -m ${{ env.MODELS_PATH }}\models\test_model\test_model_fp32.xml -d CPU
CPU_Functional_Tests:
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
index 352445e36da..7390383afe5 100644
--- a/cmake/dependencies.cmake
+++ b/cmake/dependencies.cmake
@@ -6,6 +6,9 @@ cmake_policy(SET CMP0054 NEW)
ov_set_temp_directory(TEMP "${CMAKE_SOURCE_DIR}")
+# Create platform-specific subdirectory for cross-compilation support
+set(PLATFORM_SUBDIR "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}")
+
## Intel OMP package
if(THREADING STREQUAL "OMP")
# check whether the compiler supports OpenMP at all
@@ -22,7 +25,7 @@ if(THREADING STREQUAL "OMP")
if(WIN32 AND X86_64)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_WIN "iomp.zip"
- TARGET_PATH "${TEMP}/omp"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "62c68646747fb10f19b53217cb04a1e10ff93606f992e6b35eb8c31187c68fbf"
@@ -30,7 +33,7 @@ if(THREADING STREQUAL "OMP")
elseif(LINUX AND X86_64 AND OPENVINO_GNU_LIBC)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_LIN "iomp.tgz"
- TARGET_PATH "${TEMP}/omp"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "7832b16d82513ee880d97c27c7626f9525ebd678decf6a8fe6c38550f73227d9"
@@ -38,7 +41,7 @@ if(THREADING STREQUAL "OMP")
elseif(APPLE AND X86_64)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_MAC "iomp_20190130_mac.tgz"
- TARGET_PATH "${TEMP}/omp"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "591ea4a7e08bbe0062648916f42bded71d24c27f00af30a8f31a29b5878ea0cc"
@@ -98,18 +101,17 @@ function(ov_download_tbb)
endif()
if(WIN32 AND X86_64)
- # TODO: add target_path to be platform specific as well, to avoid following if
# build oneTBB 2021.2.1 with Visual Studio 2019 (MSVC 14.21)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_WIN "oneapi-tbb-2021.2.5-win-pdb.zip"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "8acb2bd35769aac20597bc0ce1f7608e993b48dee18ee1cc144a05406b6b2613"
USE_NEW_LOCATION TRUE)
elseif(ANDROID AND X86_64)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_ANDROID "tbb2020_20200404_android.tgz"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "f42d084224cc2d643314bd483ad180b081774608844000f132859fca3e9bf0ce"
USE_NEW_LOCATION TRUE)
@@ -117,14 +119,14 @@ function(ov_download_tbb)
# build oneTBB 2021.2.1 with gcc 4.8 (glibc 2.17)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_LIN "oneapi-tbb-2021.13.0-lin-release.tgz"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "fd2e889323cd5458be750eefdc026ce6791c723fae60b146c2511a5caeaf01c5"
USE_NEW_LOCATION TRUE)
elseif(YOCTO_AARCH64)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_LIN "keembay/tbb2020_38404_kmb_lic.tgz"
- TARGET_PATH "${TEMP}/tbb_yocto"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb_yocto"
ENVIRONMENT "TBBROOT"
SHA256 "321261ff2eda6d4568a473cb883262bce77a93dac599f7bd65d2918bdee4d75b"
USE_NEW_LOCATION TRUE)
@@ -132,7 +134,7 @@ function(ov_download_tbb)
# build oneTBB 2021.2.1 with OS version 11.4
RESOLVE_DEPENDENCY(TBB
ARCHIVE_MAC "oneapi-tbb-2021.13.0-mac-canary.tgz"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "f26a8ae579c4e843781b139c6b74325ae48b58cb2a7a31a0982acda5343f0dd8"
USE_NEW_LOCATION TRUE)
@@ -140,7 +142,7 @@ function(ov_download_tbb)
# build oneTBB 2021.2.1 with Visual Studio 2022 (MSVC 14.35)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_WIN "oneapi-tbb-2021.2.5-win-arm64-trim.zip"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "c26b7593e1808c2dd15a768cd4ea1ee14aa0aa2dacb210b86e326ab7960d2473"
USE_NEW_LOCATION TRUE)
@@ -148,7 +150,7 @@ function(ov_download_tbb)
# build oneTBB with glibc 2.17
RESOLVE_DEPENDENCY(TBB
ARCHIVE_LIN "oneapi-tbb-2021.13.0-lin-arm64-release.tgz"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "6e1106735714600474440c134df25b40a225d40b44c2102d7ff23e0482834faa"
USE_NEW_LOCATION TRUE)
@@ -156,7 +158,7 @@ function(ov_download_tbb)
# build oneTBB with export MACOSX_DEPLOYMENT_TARGET=11.0
RESOLVE_DEPENDENCY(TBB
ARCHIVE_MAC "oneapi-tbb-2021.13.0-mac-arm64-canary.tgz"
- TARGET_PATH "${TEMP}/tbb"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "fb4be1dd03044a97475c45a0cf4576e502b4b64048e98e019520b0720fc255aa"
USE_NEW_LOCATION TRUE)
@@ -211,14 +213,14 @@ function(ov_download_tbbbind_2_5)
if(WIN32 AND X86_64)
RESOLVE_DEPENDENCY(TBBBIND_2_5
ARCHIVE_WIN "tbbbind_2_5_static_win_v2.zip"
- TARGET_PATH "${TEMP}/tbbbind_2_5"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "49ae93b13a13953842ff9ae8d01681b269b5b0bc205daf18619ea9a828c44bee"
USE_NEW_LOCATION TRUE)
elseif(LINUX AND X86_64 AND OPENVINO_GNU_LIBC AND OV_LIBC_VERSION VERSION_GREATER_EQUAL 2.17)
RESOLVE_DEPENDENCY(TBBBIND_2_5
ARCHIVE_LIN "tbbbind_2_5_static_lin_v4.tgz"
- TARGET_PATH "${TEMP}/tbbbind_2_5"
+ TARGET_PATH "${TEMP}/${PLATFORM_SUBDIR}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "4ebf30246530795f066fb9616e6707c6b17be7a65d29d3518b578a769dd54eea"
USE_NEW_LOCATION TRUE)
diff --git a/docs/dev/build_windows.md b/docs/dev/build_windows.md
index f9e5d8b9f42..4f49f3a06c2 100644
--- a/docs/dev/build_windows.md
+++ b/docs/dev/build_windows.md
@@ -40,7 +40,7 @@ Supported configurations:
4. Build generated solution in Visual Studio or run `cmake --build . --config Release --verbose -j<number_of_jobs>` to build from the command line. View the number of available processing units with `WMIC cpu get numberofLogicalProcessors`. Be aware that this process may take some time.
-5. Before running the samples, add paths to the Threading Building Blocks (TBB) binaries used for the build to the `%PATH%` environment variable. By default, TBB binaries are downloaded by the CMake-based script to the `<path/to/openvino>/temp/tbb/bin` folder.
+5. Before running the samples, add paths to the Threading Building Blocks (TBB) binaries used for the build to the `%PATH%` environment variable. By default, TBB binaries are downloaded by the CMake-based script to the `<path/to/openvino>/temp/<platform>/tbb/bin` folder.
### Building with PDB files support
@@ -71,7 +71,7 @@ To pack PDB files, it's essential to run cmake command to create a dedicated arc
3. After the build process finishes, export the newly built Python libraries to the user environment variables:
```
set PYTHONPATH=<openvino_repo>/bin/<arch>/Release/python;<openvino_repo>/tools/ovc;%PYTHONPATH%
- set OPENVINO_LIB_PATHS=<openvino_repo>/bin/<arch>/Release;<openvino_repo>/temp/tbb/bin
+ set OPENVINO_LIB_PATHS=<openvino_repo>/bin/<arch>/Release;<openvino_repo>/temp/<platform>/tbb/bin
set PATH=<openvino_repo>/tools/ovc/openvino/tools/ovc:%PATH%
```
or install the wheel with pip: