Skip to content

Commit 95e3096

Browse files
authoredOct 1, 2023
Added build on RedHat system to build & test RPM packages (openvinotoolkit#20134)
* Added GHA workflow for RPM packages * Avoid rebuild for RPM / Debian packages * Removed conditional include headers * try only post-build * Beautification * Fixed testdata generation for mulit-config generators
1 parent 86bf038 commit 95e3096

File tree

17 files changed

+296
-84
lines changed

17 files changed

+296
-84
lines changed
 

‎.github/workflows/fedora.yml

+224
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
name: Fedora (RHEL), Python 3.9
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
paths-ignore:
6+
- '**/docs/**'
7+
- 'docs/**'
8+
- '**/**.md'
9+
- '**.md'
10+
- '**/layer_tests_summary/**'
11+
- '**/conformance/**'
12+
push:
13+
paths-ignore:
14+
- '**/docs/**'
15+
- 'docs/**'
16+
- '**/**.md'
17+
- '**.md'
18+
- '**/layer_tests_summary/**'
19+
- '**/conformance/**'
20+
branches:
21+
- master
22+
- 'releases/**'
23+
24+
concurrency:
25+
# github.ref is not unique in post-commit
26+
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora33
27+
cancel-in-progress: true
28+
29+
jobs:
30+
Build:
31+
defaults:
32+
run:
33+
shell: bash
34+
runs-on: aks-linux-16-cores
35+
container:
36+
image: fedora:33
37+
volumes:
38+
- /mount/caches:/mount/caches
39+
env:
40+
CMAKE_BUILD_TYPE: 'Release'
41+
CMAKE_GENERATOR: 'Ninja'
42+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
43+
CMAKE_C_COMPILER_LAUNCHER: ccache
44+
GITHUB_WORKSPACE: '/__w/openvino/openvino'
45+
OPENVINO_REPO: /__w/openvino/openvino/openvino
46+
INSTALL_DIR: /__w/openvino/openvino/openvino_install
47+
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
48+
BUILD_DIR: /__w/openvino/openvino/openvino_build
49+
CCACHE_DIR: /mount/caches/ccache/fedora33_x86_64_Release
50+
CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp
51+
CCACHE_MAXSIZE: 50G
52+
steps:
53+
- name: Install git
54+
run: yum update -y && yum install -y git
55+
56+
- name: Clone OpenVINO
57+
uses: actions/checkout@v4
58+
with:
59+
path: ${{ env.OPENVINO_REPO }}
60+
submodules: 'true'
61+
62+
#
63+
# Dependencies
64+
#
65+
66+
- name: Install build dependencies
67+
run: bash ${OPENVINO_REPO}/install_build_dependencies.sh
68+
69+
- name: Install python dependencies
70+
run: |
71+
python3 -m pip install -U pip
72+
# For Python API: build and wheel packaging
73+
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
74+
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
75+
76+
# For running ONNX frontend unit tests
77+
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
78+
79+
# For running TensorFlow frontend unit tests
80+
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt
81+
82+
# For running TensorFlow Lite frontend unit tests
83+
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow_lite/tests/requirements.txt
84+
85+
# For running Paddle frontend unit tests
86+
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt
87+
88+
#
89+
# Build
90+
#
91+
92+
- name: CMake configure - OpenVINO
93+
run: |
94+
cmake \
95+
-G "${{ env.CMAKE_GENERATOR }}" \
96+
-DENABLE_CPPLINT=OFF \
97+
-DENABLE_NCC_STYLE=OFF \
98+
-DENABLE_TESTS=ON \
99+
-DENABLE_STRICT_DEPENDENCIES=OFF \
100+
-DENABLE_SYSTEM_TBB=ON \
101+
-DENABLE_SYSTEM_OPENCL=ON \
102+
-DENABLE_SYSTEM_PUGIXML=ON \
103+
-DENABLE_PYTHON_PACKAGING=ON \
104+
-DCPACK_GENERATOR=TGZ \
105+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
106+
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
107+
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
108+
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
109+
-S ${OPENVINO_REPO} \
110+
-B ${BUILD_DIR}
111+
112+
- name: Cmake build - OpenVINO
113+
run: cmake --build ${BUILD_DIR} --parallel --verbose
114+
115+
- name: Show ccache stats
116+
run: ccache --show-stats
117+
118+
- name: Cmake install - OpenVINO
119+
run: |
120+
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
121+
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake
122+
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake
123+
124+
- name: Pack Artifacts
125+
run: |
126+
pushd ${INSTALL_DIR}
127+
tar -czvf ${BUILD_DIR}/openvino_package.tar.gz *
128+
popd
129+
130+
pushd ${INSTALL_TEST_DIR}
131+
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz *
132+
popd
133+
134+
- name: Build RPM packages
135+
run: |
136+
cmake -DCPACK_GENERATOR=RPM \
137+
-DENABLE_TESTS=OFF \
138+
${BUILD_DIR}
139+
cmake --build ${BUILD_DIR} --parallel --target package --verbose
140+
141+
#
142+
# Upload build artifacts
143+
#
144+
145+
- name: Upload openvino package
146+
if: ${{ always() }}
147+
uses: actions/upload-artifact@v3
148+
with:
149+
name: openvino_package
150+
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
151+
if-no-files-found: 'error'
152+
153+
- name: Upload openvino RPM packages
154+
if: ${{ always() }}
155+
uses: actions/upload-artifact@v3
156+
with:
157+
name: openvino_rpm_packages
158+
path: ${{ env.BUILD_DIR }}/*.rpm
159+
if-no-files-found: 'error'
160+
161+
- name: Upload openvino tests package
162+
if: ${{ always() }}
163+
uses: actions/upload-artifact@v3
164+
with:
165+
name: openvino_tests
166+
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
167+
if-no-files-found: 'error'
168+
169+
RPM_Packages:
170+
needs: Build
171+
defaults:
172+
run:
173+
shell: bash
174+
runs-on: ubuntu-20.04
175+
container:
176+
image: fedora:33
177+
env:
178+
RPM_PACKAGES_DIR: /__w/openvino/packages/
179+
180+
steps:
181+
- name: Create Directories
182+
run: mkdir -p ${RPM_PACKAGES_DIR}
183+
184+
- name: Download OpenVINO RPM packages
185+
uses: actions/download-artifact@v3
186+
with:
187+
name: openvino_rpm_packages
188+
path: ${{ env.RPM_PACKAGES_DIR }}
189+
190+
- name: Install RPM packages & check conflicts
191+
run: |
192+
tee > /tmp/openvino-2023.repo << EOF
193+
[OpenVINO]
194+
name=Intel(R) Distribution of OpenVINO 2023
195+
baseurl=https://yum.repos.intel.com/openvino/2023
196+
enabled=1
197+
gpgcheck=1
198+
repo_gpgcheck=1
199+
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
200+
EOF
201+
202+
# install previous release version
203+
mv /tmp/openvino-2023.repo /etc/yum.repos.d
204+
yum install -y openvino
205+
206+
# install current version
207+
yum install --allowerasing -y *.rpm
208+
working-directory: ${{ env.RPM_PACKAGES_DIR }}
209+
210+
- name: Test RPM packages
211+
run: |
212+
/usr/share/openvino/samples/cpp/build_samples.sh
213+
/usr/share/openvino/samples/c/build_samples.sh
214+
~/openvino_cpp_samples_build/intel64/Release/hello_query_device
215+
python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py
216+
python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")'
217+
python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")'
218+
python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_METRICS")'
219+
python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_METRICS")'
220+
python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_METRICS")'
221+
python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_METRICS")'
222+
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'
223+
benchmark_app --help
224+
ovc --help

‎.github/workflows/linux.yml

+4-14
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,7 @@ jobs:
8888
bash ${OPENVINO_REPO}/install_build_dependencies.sh
8989
# default-jdk - Java API
9090
# libssl1.1 - 'python3 -m pip' in self-hosted runner
91-
# unzip - to download ninja
92-
apt install --assume-yes --no-install-recommends default-jdk libssl1.1 unzip
93-
94-
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip
95-
unzip ninja-linux.zip
96-
cp -v ninja /usr/local/bin/
91+
apt install --assume-yes --no-install-recommends default-jdk libssl1.1
9792
9893
- uses: actions/setup-python@v4
9994
with:
@@ -126,9 +121,6 @@ jobs:
126121
# Build
127122
#
128123

129-
- name: Setup ccache dir
130-
run: mkdir -p ${CCACHE_DIR}
131-
132124
- name: CMake configure - OpenVINO
133125
run: |
134126
cmake \
@@ -145,7 +137,6 @@ jobs:
145137
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
146138
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
147139
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
148-
-DCMAKE_MINIMUM_REQUIRED_VERSION=3.20 \
149140
-S ${OPENVINO_REPO} \
150141
-B ${BUILD_DIR}
151142
@@ -180,12 +171,11 @@ jobs:
180171
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
181172
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
182173
cmake -UPYTHON* \
183-
-DCPACK_GENERATOR=DEB \
184174
-DENABLE_PYTHON_PACKAGING=ON \
185-
-DPython3_EXECUTABLE=/usr/bin/python3.8 \
186175
-DENABLE_TESTS=OFF \
187-
-S ${OPENVINO_REPO} \
188-
-B ${BUILD_DIR}
176+
-DPython3_EXECUTABLE=/usr/bin/python3.8 \
177+
-DCPACK_GENERATOR=DEB \
178+
${BUILD_DIR}
189179
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target package
190180
191181
- name: Cmake & Build - OpenVINO Contrib

‎CMakeLists.txt

+16-20
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,28 @@
22
# SPDX-License-Identifier: Apache-2.0
33
#
44

5-
if(NOT DEFINED CMAKE_MINIMUM_REQUIRED_VERSION)
6-
if(DEFINED BUILD_SHARED_LIBS AND NOT BUILD_SHARED_LIBS)
7-
# 3.17: 'target_link_libraries' does not work correctly when called from
8-
# different directory where 'add_library' is called: CMake generates
9-
# incorrect OpenVINOConfig.cmake in this case
10-
# 3.18: add_library cannot create ALIAS for non-GLOBAL targets
11-
set(CMAKE_MINIMUM_REQUIRED_VERSION 3.18)
5+
if(DEFINED BUILD_SHARED_LIBS AND NOT BUILD_SHARED_LIBS)
6+
# 3.17: 'target_link_libraries' does not work correctly when called from
7+
# different directory where 'add_library' is called: CMake generates
8+
# incorrect OpenVINOConfig.cmake in this case
9+
# 3.18: add_library cannot create ALIAS for non-GLOBAL targets
10+
cmake_minimum_required(VERSION 3.18)
11+
else()
12+
if(CPACK_GENERATOR STREQUAL "DEB")
13+
# we have to use CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS variable
14+
cmake_minimum_required(VERSION 3.20)
1215
else()
13-
if(CPACK_GENERATOR STREQUAL "DEB")
14-
# we have to use CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS variable
15-
set(CMAKE_MINIMUM_REQUIRED_VERSION 3.20)
16+
if(WIN32)
17+
# 3.16: FindPython3.cmake can find Python via -DPython3_EXECUTABLE
18+
# 3.18: FindPython3.cmake can find Python automatically from virtualenv
19+
cmake_minimum_required(VERSION 3.16)
1620
else()
17-
if(WIN32)
18-
# 3.16: FindPython3.cmake can find Python via -DPython3_EXECUTABLE
19-
# 3.18: FindPython3.cmake can find Python automatically from virtualenv
20-
set(CMAKE_MINIMUM_REQUIRED_VERSION 3.16)
21-
else()
22-
# 3.13: default choice
23-
set(CMAKE_MINIMUM_REQUIRED_VERSION 3.13)
24-
endif()
21+
# 3.13: default choice
22+
cmake_minimum_required(VERSION 3.13)
2523
endif()
2624
endif()
2725
endif()
2826

29-
cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})
30-
3127
if(POLICY CMP0091)
3228
cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY
3329
endif()

‎cmake/developer_package/compile_flags/os_flags.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,13 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
299299
else()
300300
set(CMAKE_CXX_STANDARD 11)
301301
endif()
302+
endif()
303+
304+
if(NOT DEFINED CMAKE_CXX_EXTENSIONS)
302305
set(CMAKE_CXX_EXTENSIONS OFF)
306+
endif()
307+
308+
if(NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
303309
set(CMAKE_CXX_STANDARD_REQUIRED ON)
304310
endif()
305311

‎cmake/developer_package/cpplint/cpplint.cmake

+2-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ endif()
1414
if(ENABLE_CPPLINT AND NOT TARGET cpplint_all)
1515
add_custom_target(cpplint_all ALL)
1616
set_target_properties(cpplint_all PROPERTIES FOLDER cpplint)
17-
set(CPPLINT_ALL_OUTPUT_FILES "" CACHE INTERNAL "All cpplint output files")
1817
endif()
1918

2019
function(add_cpplint_target TARGET_NAME)
@@ -58,6 +57,7 @@ function(add_cpplint_target TARGET_NAME)
5857
endif()
5958

6059
file(RELATIVE_PATH source_file_relative "${CMAKE_CURRENT_SOURCE_DIR}" "${source_file}")
60+
file(RELATIVE_PATH source_file_relative_root "${CMAKE_SOURCE_DIR}" "${source_file}")
6161
set(output_file "${CMAKE_CURRENT_BINARY_DIR}/cpplint/${source_file_relative}.cpplint")
6262
string(REPLACE ".." "__" output_file "${output_file}")
6363
get_filename_component(output_dir "${output_file}" DIRECTORY)
@@ -81,17 +81,12 @@ function(add_cpplint_target TARGET_NAME)
8181
"${IEDevScripts_DIR}/cpplint/cpplint.py"
8282
"${IEDevScripts_DIR}/cpplint/cpplint_run.cmake"
8383
COMMENT
84-
"[cpplint] ${source_file}"
84+
"[cpplint] ${source_file_relative_root}"
8585
VERBATIM)
8686

8787
list(APPEND all_output_files "${output_file}")
8888
endforeach()
8989

90-
set(CPPLINT_ALL_OUTPUT_FILES
91-
${CPPLINT_ALL_OUTPUT_FILES} ${all_output_files}
92-
CACHE INTERNAL
93-
"All cpplint output files")
94-
9590
add_custom_target(${TARGET_NAME} ALL
9691
DEPENDS ${all_output_files}
9792
COMMENT "[cpplint] ${TARGET_NAME}")

‎cmake/developer_package/frontends/frontends.cmake

+12-12
Original file line numberDiff line numberDiff line change
@@ -127,33 +127,33 @@ macro(ov_add_frontend)
127127
# Generate protobuf file on build time for each '.proto' file in src/proto
128128
file(GLOB proto_files ${frontend_root_dir}/src/proto/*.proto)
129129

130-
foreach(INFILE IN LISTS proto_files)
131-
get_filename_component(FILE_DIR ${INFILE} DIRECTORY)
132-
get_filename_component(FILE_WE ${INFILE} NAME_WE)
130+
foreach(proto_file IN LISTS proto_files)
131+
file(RELATIVE_PATH proto_file_relative "${CMAKE_SOURCE_DIR}" "${proto_file}")
132+
get_filename_component(FILE_DIR ${proto_file} DIRECTORY)
133+
get_filename_component(FILE_WE ${proto_file} NAME_WE)
133134
set(OUTPUT_PB_SRC ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.cc)
134135
set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.h)
135-
set(GENERATED_PROTO ${INFILE})
136136
add_custom_command(
137137
OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
138138
COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
139-
DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO}
140-
COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}"
139+
DEPENDS ${PROTOC_DEPENDENCY} ${proto_file}
140+
COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${proto_file_relative}"
141141
VERBATIM
142142
COMMAND_EXPAND_LISTS)
143143
list(APPEND PROTO_SRCS "${OUTPUT_PB_SRC}")
144144
list(APPEND PROTO_HDRS "${OUTPUT_PB_HEADER}")
145145
endforeach()
146146

147147
file(GLOB flatbuffers_schema_files ${frontend_root_dir}/src/schema/*.fbs)
148-
foreach(INFILE IN LISTS flatbuffers_schema_files)
149-
get_filename_component(FILE_WE ${INFILE} NAME_WE)
148+
foreach(flatbuffers_schema_file IN LISTS flatbuffers_schema_files)
149+
file(RELATIVE_PATH flatbuffers_schema_file_relative "${CMAKE_SOURCE_DIR}" "${flatbuffers_schema_file}")
150+
get_filename_component(FILE_WE "${flatbuffers_schema_file}" NAME_WE)
150151
set(OUTPUT_FC_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}_generated.h)
151-
set(GENERATED_PROTO ${INFILE})
152152
add_custom_command(
153153
OUTPUT "${OUTPUT_FC_HEADER}"
154-
COMMAND ${flatbuffers_COMPILER} ARGS -c --gen-mutable -o ${CMAKE_CURRENT_BINARY_DIR} ${INFILE}
155-
DEPENDS ${flatbuffers_DEPENDENCY} ${GENERATED_PROTO}
156-
COMMENT "Running C++ flatbuffers compiler (${flatbuffers_COMPILER}) on ${GENERATED_PROTO}"
154+
COMMAND ${flatbuffers_COMPILER} ARGS -c --gen-mutable -o ${CMAKE_CURRENT_BINARY_DIR} ${flatbuffers_schema_file}
155+
DEPENDS ${flatbuffers_DEPENDENCY} ${flatbuffers_schema_file}
156+
COMMENT "Running C++ flatbuffers compiler (${flatbuffers_COMPILER}) on ${flatbuffers_schema_file_relative}"
157157
VERBATIM
158158
COMMAND_EXPAND_LISTS)
159159
list(APPEND PROTO_HDRS "${OUTPUT_FC_HEADER}")

‎src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ if(CYTHON_EXIT_CODE EQUAL 0)
6868
string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}")
6969
else()
7070
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
71-
set(CYTHON_MESSAGE_MODE TRACE)
71+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
72+
set(CYTHON_MESSAGE_MODE TRACE)
73+
else()
74+
set(CYTHON_MESSAGE_MODE WARNING)
75+
endif()
7276
endif()
7377
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
7478
set(CYTHON_MESSAGE_MODE FATAL_ERROR)

‎src/cmake/openvino.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ if(ENABLE_PKGCONFIG_GEN)
284284
set(pkgconfig_option "--validate")
285285
endif()
286286

287-
add_custom_command(TARGET openvino PRE_BUILD
287+
add_custom_command(TARGET openvino POST_BUILD
288288
COMMAND "${CMAKE_COMMAND}" --config $<CONFIG>
289289
-D PKG_CONFIG_IN_FILE=${pkgconfig_in}
290290
-D PKG_CONFIG_OUT_FILE=${pkgconfig_out}

‎src/core/tests/frontend/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/mock_frontend.cpp)
66
set(MOCK1_FE_NAME openvino_mock1_frontend)
7-
add_library(${MOCK1_FE_NAME} SHARED EXCLUDE_FROM_ALL ${SRC})
7+
add_library(${MOCK1_FE_NAME} SHARED ${SRC})
88

99
ov_add_library_version(${MOCK1_FE_NAME})
1010

@@ -18,5 +18,5 @@ add_dependencies(ov_core_unit_tests ${MOCK1_FE_NAME})
1818
ov_add_clang_format_target(${MOCK1_FE_NAME}_clang FOR_TARGETS ${MOCK1_FE_NAME})
1919

2020
install(TARGETS ${MOCK1_FE_NAME}
21-
RUNTIME DESTINATION tests COMPONENT tests OPTIONAL EXCLUDE_FROM_ALL
22-
LIBRARY DESTINATION tests COMPONENT tests OPTIONAL EXCLUDE_FROM_ALL)
21+
RUNTIME DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL
22+
LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)

‎src/frontends/paddle/tests/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ endif()
4444
# PDPD 2.5.1 is not compatible with tests models we use
4545
set(paddlepaddle_FOUND OFF)
4646

47-
set(TEST_PADDLE_MODELS_DIRNAME test_model_zoo/paddle_test_models)
47+
set(TEST_PADDLE_MODELS_DIRNAME ${TEST_MODEL_ZOO}/paddle_test_models)
4848
target_compile_definitions(${TARGET_NAME} PRIVATE -D TEST_PADDLE_MODELS_DIRNAME=\"${TEST_PADDLE_MODELS_DIRNAME}/\")
4949

5050
set(PADDLEDET_OPS_URL "https://raw.githubusercontent.com/PaddlePaddle/PaddleDetection/release/2.1/ppdet/modeling/ops.py")
@@ -58,7 +58,7 @@ DownloadAndCheck(${PADDLEDET_OPS_URL} ${PADDLEDET_DIRNAME}/ops.py PADDLEDET_FATA
5858
# This is done this way for 'code style' and check cases - cmake shall pass, but CI machine doesn't need to have
5959
# 'paddlepaddle' installed to check code style
6060
if(paddlepaddle_FOUND AND PADDLEDET_RESULT)
61-
set(TEST_PADDLE_MODELS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_PADDLE_MODELS_DIRNAME}/)
61+
set(TEST_PADDLE_MODELS ${TEST_MODEL_ZOO_OUTPUT_DIR}/paddle_test_models/)
6262

6363
file(GLOB_RECURSE PADDLE_ALL_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/*.py)
6464
set(OUT_FILE ${TEST_PADDLE_MODELS}/generate_done.txt)

‎src/frontends/tensorflow/tests/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ ov_check_pip_packages(REQUIREMENTS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/requirement
3333
WARNING_MESSAGE "TensorFlow testing models weren't generated, some tests will fail due models not found"
3434
RESULT_VAR tensorflow_FOUND)
3535

36-
set(TEST_TENSORFLOW_MODELS_DIRNAME test_model_zoo/tensorflow_test_models)
36+
set(TEST_TENSORFLOW_MODELS_DIRNAME ${TEST_MODEL_ZOO}/tensorflow_test_models)
3737
target_compile_definitions(${TARGET_NAME} PRIVATE -D TEST_TENSORFLOW_MODELS_DIRNAME=\"${TEST_TENSORFLOW_MODELS_DIRNAME}/\")
3838

3939
# If 'tensorflow' is not found, code will still be compiled
4040
# but models will not be generated and tests will fail
4141
# This is done this way for 'code style' and check cases - cmake shall pass, but CI machine doesn't need to have
4242
# 'tensorflow' installed to check code style
4343
if (tensorflow_FOUND)
44-
set(TEST_TENSORFLOW_MODELS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TENSORFLOW_MODELS_DIRNAME}/)
44+
set(TEST_TENSORFLOW_MODELS ${TEST_MODEL_ZOO_OUTPUT_DIR}/tensorflow_test_models/)
4545

4646
file(GLOB_RECURSE TENSORFLOW_GEN_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/test_models/gen_scripts/generate_*.py)
4747
file(GLOB_RECURSE TENSORFLOW_MODELS_PBTXT ${CMAKE_CURRENT_SOURCE_DIR}/test_models/models_pbtxt/*.pbtxt)

‎src/frontends/tensorflow_lite/tests/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ ov_check_pip_packages(REQUIREMENTS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/requirement
2727
WARNING_MESSAGE "TensorFlow Lite testing models weren't generated, some tests will fail due models not found"
2828
RESULT_VAR tensorflow_FOUND)
2929

30-
set(TEST_TENSORFLOW_LITE_MODELS_DIRNAME test_model_zoo/tensorflow_lite_test_models)
30+
set(TEST_TENSORFLOW_LITE_MODELS_DIRNAME ${TEST_MODEL_ZOO}/tensorflow_lite_test_models)
3131
target_compile_definitions(${TARGET_NAME} PRIVATE -D TEST_TENSORFLOW_LITE_MODELS_DIRNAME=\"${TEST_TENSORFLOW_LITE_MODELS_DIRNAME}/\")
3232

3333
# If 'tensorflow' is not found, code will still be compiled
3434
# but models will not be generated and tests will fail
3535
# This is done this way for 'code style' and check cases - cmake shall pass, but CI machine doesn't need to have
3636
# 'tensorflow' installed to check code style
3737
if (tensorflow_FOUND)
38-
set(TEST_TENSORFLOW_LITE_MODELS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TENSORFLOW_LITE_MODELS_DIRNAME}/)
38+
set(TEST_TENSORFLOW_LITE_MODELS "${TEST_MODEL_ZOO_OUTPUT_DIR}/tensorflow_lite_test_models")
3939

4040
file(GLOB_RECURSE TENSORFLOW_GEN_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/test_models/gen_scripts/generate_*.py)
4141
file(GLOB_RECURSE TENSORFLOW_ALL_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/*.py)

‎src/inference/CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ file (GLOB LIBRARY_SRC
2323
set(IE_STATIC_DEPENDENT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/file_utils.cpp)
2424
list(REMOVE_ITEM LIBRARY_SRC ${IE_STATIC_DEPENDENT_FILES})
2525

26-
if(ENABLE_IR_V7_READER)
26+
if(BUILD_SHARED_LIBS OR ENABLE_IR_V7_READER)
27+
# TODO: remove together with GNA plugin
28+
# we have unconditional adding of the ENABLE_IR_V7_READER compile definition for shared libs case
29+
# to avoid rebuild, relink during work with build tree
2730
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/ie_network_reader.cpp PROPERTIES
2831
COMPILE_DEFINITIONS "ENABLE_IR_V7_READER")
2932
endif()
@@ -149,7 +152,6 @@ target_include_directories(${TARGET_NAME}_obj PRIVATE
149152
# for ov_plugins.hpp
150153
$<IF:$<AND:$<BOOL:${OV_GENERATOR_MULTI_CONFIG}>,$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.20>>,${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>,${CMAKE_CURRENT_BINARY_DIR}>
151154
# for ie_ir_version.hpp
152-
$<$<TARGET_EXISTS:inference_engine_ir_v7_reader>:$<TARGET_PROPERTY:inference_engine_ir_v7_reader,SOURCE_DIR>>
153155
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_gna/legacy/include"
154156
$<TARGET_PROPERTY:${TARGET_NAME}_transformations,INTERFACE_INCLUDE_DIRECTORIES>
155157
$<TARGET_PROPERTY:${TARGET_NAME}_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>)

‎src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"appPath" : "/<e2e_path>/e2e/frameworks.ai.openvino.tests/e2e_oss/",
33
"appCmd" : "pytest test_dynamism.py <e2e_args>",
44
"envVars" : [
5-
{"name" : "PYTHONPATH", "val" : "/<ov_path>/bin/intel64/Release/python_api/python3.8/"},
5+
{"name" : "PYTHONPATH", "val" : "/<ov_path>/bin/intel64/Release/python/"},
66
{"name" : "LD_LIBRARY_PATH", "val" : "/<ov_path>/bin/intel64/Release/"},
77
{"name" : "MO_ROOT", "val" : "/<ov_path>/tools/mo/openvino/tools/"},
88
{"name" : "OPENVINO_ROOT_DIR", "val" : "/<ov_path>/"}

‎src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ elseif((NOT ANDROID) AND UNIX)
8181
target_link_libraries(${TARGET_NAME} PRIVATE pthread)
8282
endif()
8383

84-
if(WIN32)
85-
set(TUNING_CACHE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>")
84+
if(OV_GENERATOR_MULTI_CONFIG)
85+
set(TUNING_CACHE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>")
8686
else()
8787
set(TUNING_CACHE_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/")
8888
endif()

‎tools/mo/openvino/tools/mo/utils/find_ie_version.py

+8-13
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,21 @@ def find_ie_version(silent=False):
7878
if try_to_import_ie(silent=silent):
7979
return True
8080

81-
python_version = 'python{}.{}'.format(sys.version_info[0], sys.version_info[1])
82-
8381
script_path = os.path.realpath(os.path.dirname(__file__))
8482

8583
# Windows
8684
bindings_paths_windows = [
8785
# Local builds
8886
{
89-
"module": os.path.join(script_path, '../../../../../../bin/intel64/Release/python_api/', python_version),
87+
"module": os.path.join(script_path, '../../../../../../bin/intel64/Release/python/'),
9088
"libs": [
91-
os.path.join(script_path, '../../../../../../bin/intel64'),
9289
os.path.join(script_path, '../../../../../../bin/intel64/Release'),
9390
os.path.join(script_path, '../../../../../../temp/tbb/bin'),
9491
]
9592
},
9693
{
97-
"module": os.path.join(script_path, '../../../../../../bin/intel64/Debug/python_api/', python_version),
94+
"module": os.path.join(script_path, '../../../../../../bin/intel64/Debug/python/'),
9895
"libs": [
99-
os.path.join(script_path, '../../../../../../bin/intel64'),
10096
os.path.join(script_path, '../../../../../../bin/intel64/Debug'),
10197
os.path.join(script_path, '../../../../../../temp/tbb/bin'),
10298
]
@@ -107,22 +103,21 @@ def find_ie_version(silent=False):
107103
bindings_paths_linux = [
108104
# Local builds
109105
{
110-
"module": os.path.join(script_path, '../../../../../../bin/intel64/Release/lib/python_api/', python_version),
106+
"module": os.path.join(script_path, '../../../../../../bin/intel64/Release/python/'),
111107
"libs": [
112-
os.path.join(script_path, '../../../../../../bin/intel64/Release/lib'),
108+
os.path.join(script_path, '../../../../../../bin/intel64/Release'),
113109
]
114110
},
115-
116111
{
117-
"module": os.path.join(script_path, '../../../../../../bin/intel64/RelWithDebInfo/lib/python_api/', python_version),
112+
"module": os.path.join(script_path, '../../../../../../bin/intel64/RelWithDebInfo/python'),
118113
"libs": [
119-
os.path.join(script_path, '../../../../../../bin/intel64/RelWithDebInfo/lib'),
114+
os.path.join(script_path, '../../../../../../bin/intel64/RelWithDebInfo'),
120115
]
121116
},
122117
{
123-
"module": os.path.join(script_path, '../../../../../../bin/intel64/Debug/lib/python_api/', python_version),
118+
"module": os.path.join(script_path, '../../../../../../bin/intel64/Debug/python'),
124119
"libs": [
125-
os.path.join(script_path, '../../../../../../bin/intel64/Debug/lib'),
120+
os.path.join(script_path, '../../../../../../bin/intel64/Debug'),
126121
]
127122
}
128123
]

‎tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_OLD ${CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY}
88
set(CMAKE_PDB_OUTPUT_DIRECTORY_OLD ${CMAKE_PDB_OUTPUT_DIRECTORY})
99

1010
if(OV_GENERATOR_MULTI_CONFIG)
11-
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<CONFIG>/python_api)
11+
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<CONFIG>/python/openvino)
1212
else()
13-
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/python_api)
13+
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/python/openvino)
1414
endif()
1515

1616
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY})

0 commit comments

Comments
 (0)
Please sign in to comment.