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 OMP threading #26191

Closed
wants to merge 8 commits into from
Closed
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 @@ -206,14 +206,11 @@ jobs:
install_dependencies/install_openvino_dependencies.sh
popd

cp -v ${OPENVINO_REPO}/temp/tbb/lib/lib* ${INSTALL_TEST_DIR}/tests
pushd ${INSTALL_TEST_DIR}
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz \
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/*
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\Release
set path=%path%;${{ env.BUILD_DIR }}\bin\Release
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\Release
set path=%path%;${{ env.BUILD_DIR }}\bin\Release

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/Release/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/Release/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 @@ -337,7 +337,7 @@ jobs:
- name: Run with CC-ed runtime
shell: cmd
run: |
set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin;${{ env.BUILD_DIR }}\bin\Release
set path=%path%;${{ env.BUILD_DIR }}\bin\Release
${{ 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 @@ -394,7 +394,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
4 changes: 2 additions & 2 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif()

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

if(X86_64)
if(X86_64 AND (LINUX OR WIN32))
set(ENABLE_INTEL_NPU_DEFAULT ON)
else()
set(ENABLE_INTEL_NPU_DEFAULT OFF)
Expand Down Expand Up @@ -91,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
8 changes: 6 additions & 2 deletions src/plugins/intel_cpu/thirdparty/ACLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ elseif(NOT TARGET arm_compute::arm_compute)
set(ARM_COMPUTE_OPTIONS
neon=1
opencl=0
openmp=0
cppthreads=1
examples=0
Werror=0
gemm_tuner=0
Expand All @@ -146,6 +144,12 @@ elseif(NOT TARGET arm_compute::arm_compute)
arch=${OV_CPU_ARM_TARGET_ARCH}
)

if(THREADING STREQUAL "OMP")
list(APPEND ARM_COMPUTE_OPTIONS openmp=1 cppthreads=0)
else()
list(APPEND ARM_COMPUTE_OPTIONS openmp=0 cppthreads=1)
endif()

if(ARM)
list(APPEND ARM_COMPUTE_OPTIONS estate=32)
else()
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 @@ -64,7 +66,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