Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test OpenMP support #26710

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,11 @@ 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
pushd ${INSTALL_TEST_DIR}
tar -cvf - \
tests/ov_cpu_func_tests \
tests/libopenvino_template_extension.so \
tests/libze_loader.so* \
tests/libhwloc* \
tests/libtbb* \
tests/functional_test_utils/layer_tests_summary/* \
| pigz > ${BUILD_DIR}/openvino_tests.tar.gz
popd
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,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.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.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 }} ^
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
Compress-Archive @compress

$compress = @{
Path = "${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_cpu_func_tests.exe", "${{ env.BUILD_DIR }}/bin/${{ env.CMAKE_BUILD_TYPE }}/ze_loader.dll", "${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/openvino_template_extension.dll", "${{ env.OPENVINO_REPO }}/src/tests/test_utils/functional_test_utils/layer_tests_summary", "${{ env.INSTALL_DIR }}/runtime/3rdparty/tbb"
Path = "${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_cpu_func_tests.exe", "${{ env.BUILD_DIR }}/bin/${{ env.CMAKE_BUILD_TYPE }}/ze_loader.dll", "${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/openvino_template_extension.dll", "${{ env.OPENVINO_REPO }}/src/tests/test_utils/functional_test_utils/layer_tests_summary"
CompressionLevel = "Optimal"
DestinationPath = "${{ env.BUILD_DIR }}/openvino_tests.zip"
}
Expand Down Expand Up @@ -340,7 +340,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.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:
Expand Down Expand Up @@ -397,7 +397,7 @@ jobs:
- name: Intel CPU plugin func tests (parallel)
shell: cmd
run: |
set path=%path%;${{ env.INSTALL_TEST_DIR }}\tbb\bin;${{ env.INSTALL_TEST_DIR }}\tbb;${{ env.INSTALL_TEST_DIR }}
set path=%path%;${{ env.INSTALL_TEST_DIR }}
python3 ${{ env.PARALLEL_TEST_SCRIPT }} -e ${{ env.INSTALL_TEST_DIR }}\ov_cpu_func_tests.exe -w ${{ env.INSTALL_TEST_DIR }} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke*
timeout-minutes: 60

Expand Down
10 changes: 8 additions & 2 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ endif()

ov_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)

ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ON "X86_64;WIN32 OR LINUX" OFF)
if(X86_64 AND (LINUX OR WIN32))
set(ENABLE_INTEL_NPU_DEFAULT ON)
else()
set(ENABLE_INTEL_NPU_DEFAULT OFF)
endif()

ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ${ENABLE_INTEL_NPU_DEFAULT} "X86 OR X86_64;NOT APPLE" OFF)
ov_dependent_option (ENABLE_INTEL_NPU_INTERNAL "NPU plugin internal components for OpenVINO runtime" ON "ENABLE_INTEL_NPU" OFF)

ov_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
Expand Down Expand Up @@ -85,7 +91,7 @@ if(ANDROID)
elseif(RISCV64)
set(THREADING_DEFAULT "OMP")
else()
set(THREADING_DEFAULT "TBB")
set(THREADING_DEFAULT "OMP")
endif()

set(THREADING_OPTIONS "TBB" "TBB_AUTO" "SEQ" "OMP")
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/c/tests/ov_infer_request_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ TEST_P(ov_infer_request_test, infer_async) {
}
}

TEST_P(ov_infer_request_test, infer_async_wait_for) {
TEST_P(ov_infer_request_test, DISABLED_infer_async_wait_for) {
OV_EXPECT_OK(ov_infer_request_set_input_tensor_by_index(infer_request, 0, input_tensor));

OV_ASSERT_OK(ov_infer_request_start_async(infer_request));
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/intel_cpu/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_TOOLSET_VERSION GREATER_EQUAL
# This flag is needed for enabling SIMD vectorization with command '#pragma omp simd'.
# Compilation with '/openmp:experimental' key allow us to enable vectorizatikon capability in MSVC.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp:experimental")
# see https://github.com/openvinotoolkit/openvino/pull/4496
set(OpenMP_cmake_included ON)
endif()

if(ENABLE_LTO)
Expand Down Expand Up @@ -75,7 +77,7 @@ function(ov_add_onednn)
endif()

set(SDL_cmake_included ON) ## to skip internal SDL flags. SDL flags are already set on OV level
if (ANDROID OR ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR OV_COMPILER_IS_CLANG) AND NOT (THREADING STREQUAL "OMP")))
if (ANDROID)
set(OpenMP_cmake_included ON) ## to skip "omp simd" inside a code. Lead to some crashes inside NDK LLVM..
endif()

Expand Down
Loading