Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into itikhono/transfor…
Browse files Browse the repository at this point in the history
…mations/ngraph_to_ov_refactoring
  • Loading branch information
itikhono committed Sep 15, 2023
2 parents e1f76e3 + 0edd62b commit 47ea9b3
Show file tree
Hide file tree
Showing 350 changed files with 8,863 additions and 6,313 deletions.
2 changes: 1 addition & 1 deletion .ci/azure/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ jobs:
- script: |
set -e
source $(BUILD_OPENVINO)/dependencies/conanbuild.sh
# TODO: return tests building once GPU plugin migrates to Plugin API 2.0
cmake \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=OFF \
Expand All @@ -197,6 +196,7 @@ jobs:
-DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libc-2.31.so \
-DPYTHON_INCLUDE_DIR=$(Agent.ToolsDirectory)/Python/$(OV_PYTHON_VERSION)/x64/include/python$(OV_PYTHON_VERSION_MAJOR_MINOR) \
-DENABLE_DATA=OFF \
-DENABLE_TESTS=ON \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \
-DENABLE_SYSTEM_SNAPPY=ON \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,6 @@ jobs:
lcov --capture --directory ${{ github.workspace }}/. --output-file coverage.info
genhtml coverage.info --output-directory coverage-report
- name: Collect coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
verbose: true
142 changes: 142 additions & 0 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Linux Conditional Compilation (Ubuntu 22.04, Python 3.11)
on:
workflow_dispatch:
schedule:
# run daily at 00:00
- cron: '0 0 * * *'
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master

concurrency:
group: ${{ github.head_ref || github.run_id }}-linux-cc
cancel-in-progress: true

jobs:
Build:
# TODO: remove. Temporary measure to prevent the workflow from scheduling on forks.
if: ${{ github.repository_owner == 'openvinotoolkit' }}
defaults:
run:
shell: bash
runs-on: ubuntu-latest-8-cores
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: ${{ github.workspace }}/openvino
OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib
BUILD_DIR: ${{ github.workspace }}/build
DATA_PATH: ${{ github.workspace }}/testdata
MODELS_PATH: ${{ github.workspace }}/testdata
OV_TEMP: ${{ github.workspace }}/openvino_temp
PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"
steps:
- name: Clone OpenVINO
uses: actions/checkout@v3
with:
path: 'openvino'
submodules: 'recursive'

- name: Clone testdata for C API tests
uses: actions/checkout@v3
with:
repository: 'openvinotoolkit/testdata'
path: 'testdata'
submodules: 'recursive'
lfs: 'true'

#
# Dependencies
#

- name: Install build dependencies
run: |
sudo -E ${{ env.OPENVINO_REPO }}/install_build_dependencies.sh
sudo -E apt update
sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
- uses: actions/setup-python@v4
with:
python-version: '3.11'

#
# Build
#

- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
# save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
verbose: 2
key: linux-cc
restore-keys: |
linux-cc
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: CMake configure CC COLLECT
run: |
cmake \
-G "Ninja Multi-Config" \
-DENABLE_CPPLINT=OFF \
-DENABLE_GAPI_PREPROCESSING=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-DENABLE_FASTER_BUILD=ON \
-DENABLE_PROFILING_ITT=ON \
-DSELECTIVE_BUILD=COLLECT \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
- name: Clean ccache stats
run: ccache --zero-stats --show-config

- name: Build CC COLLECT
run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config Release --target openvino_intel_cpu_plugin openvino_ir_frontend benchmark_app sea_itt_lib

- name: Show ccache stats
run: ccache --show-stats

- name: Code usage analysis
run: |
python3 ${{ env.OPENVINO_REPO }}/thirdparty/itt_collector/runtool/sea_runtool.py \
--bindir ${{ env.OPENVINO_REPO }}/bin/intel64/Release -o ${{ env.BUILD_DIR }}/itt_stat ! \
${{ env.OPENVINO_REPO }}/bin/intel64/Release/benchmark_app -niter 1 -nireq 1 \
-m ${{ env.MODELS_PATH }}/models/test_model/test_model_fp32.xml -d CPU
- name: CMake configure with CC ON
run: cmake -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=${{ env.BUILD_DIR }}/*.csv -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }}

- name: Build with CC ON
run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config Release --target openvino_intel_cpu_plugin openvino_ir_frontend

- name: Use OpenVINO after CC
run: |
${{ env.OPENVINO_REPO }}/bin/intel64/Release/benchmark_app -niter 1 -nireq 1 \
-m ${{ env.MODELS_PATH }}/models/test_model/test_model_fp32.xml -d CPU
170 changes: 170 additions & 0 deletions .github/workflows/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: Tests on Windows Conditional Compilation (VS 2022, Python 3.11)
on:
workflow_dispatch:
schedule:
# run daily at 00:00
- cron: '0 0 * * *'
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master

concurrency:
group: ${{ github.head_ref || github.run_id }}-windows-cc
cancel-in-progress: true

env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
OPENVINO_CONTRIB_REPO: "${{ github.workspace }}\\openvino_contrib"
INSTALL_DIR: "${{ github.workspace }}\\install_pkg"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
SAMPLES_INSTALL_DIR: "${{ github.workspace }}\\install\\samples"
LAYER_TESTS_INSTALL_DIR: "${{ github.workspace }}\\install\\tests\\layer_tests"
BUILD_DIR: "${{ github.workspace }}\\build"
BUILD_DIR_2: "${{ github.workspace }}\\build_s"
DATA_PATH: "${{ github.workspace }}\\testdata"
MODELS_PATH: "${{ github.workspace }}\\testdata"
OV_TEMP: "${{ github.workspace }}\\openvino_temp"
BUILD_TYPE: "Release"
PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"
VCVARSPATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"

jobs:
Build:
# TODO: remove. Temporary measure to prevent the workflow from scheduling on forks.
if: ${{ github.repository_owner == 'openvinotoolkit' }}
defaults:
run:
shell: pwsh
runs-on: windows-latest-8-cores
steps:
- name: Clone OpenVINO
uses: actions/checkout@v3
with:
path: 'openvino'
submodules: 'recursive'

- name: Clone testdata for sample test
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/testdata'
path: 'testdata'
submodules: 'recursive'
lfs: 'true'

#
# Dependencies
#

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install build dependencies
run: |
choco install --no-progress ninja
#
# Build
#

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

- uses: ilammy/msvc-dev-cmd@v1

- name: Setup sccache
uses: hendrikmuhs/[email protected]
with:
variant: sccache
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
key: ${{ github.job }}-windows-cc
restore-keys: |
${{ github.job }}-windows-cc
- name: CMake CC COLLECT
run: |
& "${{ env.VCVARSPATH }}" x64 && cmake -G Ninja `
-DENABLE_CPPLINT=OFF `
-DENABLE_GAPI_PREPROCESSING=OFF `
-DENABLE_PLUGINS_XML=ON `
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF `
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
-DENABLE_PROFILING_ITT=ON `
-DSELECTIVE_BUILD=COLLECT `
-S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }}
- name: Build CC COLLECT
run: |
& "${{ env.VCVARSPATH }}" x64 && cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }} `
--target openvino_intel_cpu_plugin openvino_ir_frontend benchmark_app sea_itt_lib
- name: List bin files
shell: cmd
run: dir ${{ env.OPENVINO_REPO }}\bin\ /s

- name: Code usage analysis
shell: cmd
working-directory: ${{ env.OPENVINO_REPO }}
run: |
set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin
call "${{ env.VCVARSPATH }}" && python thirdparty\itt_collector\runtool\sea_runtool.py --bindir ${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.BUILD_TYPE }} -o ${{ env.BUILD_DIR }}\itt_stat ! ${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.BUILD_TYPE }}\benchmark_app.exe -niter 1 -nireq 1 -m ${{ env.MODELS_PATH }}\models\test_model\test_model_fp32.xml -d CPU
- name: List csv files
shell: cmd
run: dir ${{ env.BUILD_DIR }}\*.csv /s /p

- name: CMake CC ON
run: |
& "${{ env.VCVARSPATH }}" x64 && cmake -G "Visual Studio 17 2022" `
-DVERBOSE_BUILD=ON `
-DENABLE_CPPLINT=OFF `
-DENABLE_GAPI_PREPROCESSING=OFF `
-DENABLE_PROFILING_ITT=OFF `
-DSELECTIVE_BUILD=ON `
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF `
-DSELECTIVE_BUILD_STAT=${{ env.BUILD_DIR }}\*.csv `
-S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR_2 }}
- name: Build CC ON
run: |
& "${{ env.VCVARSPATH }}" x64 && cmake --build ${{ env.BUILD_DIR_2 }} --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }} `
--target openvino_intel_cpu_plugin openvino_ir_frontend benchmark_app
- name: List bin files ON
shell: cmd
run: dir ${{ env.OPENVINO_REPO }}\bin\ /s

- name: Check conditional_compilation_gen.h header
shell: cmd
run: type ${{ env.BUILD_DIR_2 }}\src\common\conditional_compilation\conditional_compilation_gen.h

- name: Use OpenVINO after CC
shell: cmd
run: |
set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin
${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.BUILD_TYPE }}\benchmark_app.exe -niter 1 -nireq 1 -m ${{ env.MODELS_PATH }}\models\test_model\test_model_fp32.xml -d CPU
2 changes: 1 addition & 1 deletion cmake/developer_package/add_ie_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function(addIeTarget)
endif()
if (ARG_ADD_CLANG_FORMAT)
# code style
add_clang_format_target(${ARG_NAME}_clang FOR_TARGETS ${ARG_NAME})
ov_add_clang_format_target(${ARG_NAME}_clang FOR_TARGETS ${ARG_NAME})
endif()
if (ARG_DEVELOPER_PACKAGE)
# developer package
Expand Down
5 changes: 5 additions & 0 deletions cmake/developer_package/api_validator/api_validator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ endfunction()
#
# ie_add_api_validator_post_build_step(TARGET <name>)
#
macro(ov_add_api_validator_post_build_step)
_ov_add_api_validator_post_build_step(${ARGV})
endmacro()

macro(ie_add_api_validator_post_build_step)
message(WARNING "ie_add_api_validator_post_build_step is deprecated, use ov_add_api_validator_post_build_step instead")
_ov_add_api_validator_post_build_step(${ARGV})
endmacro()
11 changes: 8 additions & 3 deletions cmake/developer_package/clang_format/clang_format.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ if(ENABLE_CLANG_FORMAT AND NOT TARGET clang_format_check_all)
endif()

#
# add_clang_format_target(FOR_TARGETS <target1 target2 ...> | FOR_SOURCES <source1 source2 ...>
# [EXCLUDE_PATTERNS <pattern1 pattern2 ...>])
# ov_add_clang_format_target(FOR_TARGETS <target1 target2 ...> | FOR_SOURCES <source1 source2 ...>
# [EXCLUDE_PATTERNS <pattern1 pattern2 ...>])
#
function(add_clang_format_target TARGET_NAME)
function(ov_add_clang_format_target TARGET_NAME)
if(NOT ENABLE_CLANG_FORMAT)
return()
endif()
Expand Down Expand Up @@ -130,3 +130,8 @@ function(add_clang_format_target TARGET_NAME)
add_dependencies(clang_format_check_all ${TARGET_NAME})
add_dependencies(clang_format_fix_all ${TARGET_NAME}_fix)
endfunction()

function(add_clang_format_target)
message(WARNING "add_clang_format_target is deprecated, use ov_add_clang_format_target instead")
ov_add_clang_format_target(${ARGV})
endfunction()
Loading

0 comments on commit 47ea9b3

Please sign in to comment.