Skip to content

Commit d0619ed

Browse files
Removed IE and ngraph headers / cmake interfaces from package (openvinotoolkit#22203)
* Revert "Revert IE cmake config back" * Update src/cmake/openvino.cmake * Fixed for NVIDIA plugin * Fixed tests compilation * Use ilya's contrib repo * Fixes for ONNX Runtime tests * Use custom nVIDIA repo * Disable ONNX Runtime
1 parent 15a098f commit d0619ed

File tree

33 files changed

+65
-281
lines changed

33 files changed

+65
-281
lines changed

.github/workflows/job_onnx_runtime.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ jobs:
8080
popd
8181
8282
- name: Install OpenVINO dependencies
83-
run: ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y
83+
run: |
84+
${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y
85+
# since we are on Ubuntu 22.04, but compiled OpenVINO on Ubuntu 20.04, we need to install `libtbb2`
86+
apt-get install --assume-yes --no-install-recommends libtbb2
8487
8588
- name: Clone ONNX Runtime
8689
run: |
@@ -139,13 +142,6 @@ jobs:
139142
./onnxruntime_global_thread_pools_test
140143
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
141144

142-
# Test removed in onnxruntime 1.16.2
143-
# - name: Run onnxruntime_api_tests_without_env
144-
# run: |
145-
# source ${INSTALL_DIR}/setupvars.sh
146-
# ./onnxruntime_api_tests_without_env
147-
# working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
148-
149145
- name: Run pytorch-converted tests
150146
run: |
151147
source ${INSTALL_DIR}/setupvars.sh

.github/workflows/linux.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,16 @@ jobs:
407407

408408
ONNX_Runtime:
409409
name: ONNX Runtime Integration
410-
if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT ||
411-
fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE
410+
# Enable back once https://github.com/microsoft/onnxruntime/pull/19184 is merged
411+
if: ${{ 'false' }}
412+
# if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT ||
413+
# fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE
412414
needs: [ Build, Smart_CI ]
413415
uses: ./.github/workflows/job_onnx_runtime.yml
414416
with:
415417
runner: 'aks-linux-16-cores-32gb'
416-
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
417-
sccache-azure-key-prefix: 'ubuntu20_x86_64_onnxruntime'
418+
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
419+
sccache-azure-key-prefix: 'ubuntu22_x86_64_onnxruntime'
418420

419421
ONNX_Models:
420422
name: ONNX Models Tests

.github/workflows/linux_arm64.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,16 @@ jobs:
308308

309309
ONNX_Runtime:
310310
name: ONNX Runtime Integration
311-
if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT ||
312-
fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE
311+
# Enable back once https://github.com/microsoft/onnxruntime/pull/19184 is merged
312+
if: ${{ 'false' }}
313+
# if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT ||
314+
# fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE
313315
needs: [ Build, Smart_CI ]
314316
uses: ./.github/workflows/job_onnx_runtime.yml
315317
with:
316318
runner: 'aks-linux-16-cores-arm'
317-
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
318-
sccache-azure-key-prefix: 'ubuntu20_aarch64_onnxruntime'
319+
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
320+
sccache-azure-key-prefix: 'ubuntu22_aarch64_onnxruntime'
319321

320322
CXX_Unit_Tests:
321323
name: C++ unit tests

cmake/templates/InferenceEngineConfig-version.cmake.in

-29
This file was deleted.

cmake/templates/InferenceEngineConfig.cmake.in

-87
This file was deleted.

cmake/templates/ngraphConfig.cmake.in

-102
This file was deleted.

install_build_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ elif command -v cmake3 &> /dev/null; then
218218
fi
219219

220220
current_cmake_ver=$($cmake_command --version | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')
221-
required_cmake_ver=3.20.0
221+
required_cmake_ver=3.24.0
222222
if [ ! "$(printf '%s\n' "$required_cmake_ver" "$current_cmake_ver" | sort -V | head -n1)" = "$required_cmake_ver" ]; then
223223
installed_cmake_ver=3.26.0
224224
arch=$(uname -m)

src/cmake/openvino.cmake

-13
Original file line numberDiff line numberDiff line change
@@ -184,27 +184,14 @@ string(REPLACE "$<CONFIG>" "" OPENVINO_LIB_DIR "${OV_CPACK_LIBRARYDIR}")
184184
set(OV_TBB_DIR "${OV_TBB_DIR_INSTALL}")
185185
set(OV_TBBBIND_DIR "${OV_TBBBIND_DIR_INSTALL}")
186186

187-
configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig.cmake.in"
188-
"${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake"
189-
INSTALL_DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
190-
PATH_VARS ${PATH_VARS} ${INSTALL_PATH_VARS})
191-
192187
configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig.cmake.in"
193188
"${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake"
194189
INSTALL_DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
195190
PATH_VARS ${PATH_VARS} ${INSTALL_PATH_VARS})
196191

197-
configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in"
198-
"${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake" @ONLY)
199192
configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cmake.in"
200193
"${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake" @ONLY)
201194

202-
install(FILES "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake"
203-
"${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake"
204-
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
205-
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
206-
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
207-
208195
install(FILES "${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake"
209196
"${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake"
210197
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}

src/core/CMakeLists.txt

-14
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,3 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
157157
FILES_MATCHING
158158
PATTERN "*.hpp"
159159
PATTERN "*.h")
160-
161-
configure_package_config_file(${OpenVINO_SOURCE_DIR}/cmake/templates/ngraphConfig.cmake.in
162-
${CMAKE_BINARY_DIR}/ngraphConfig.cmake
163-
INSTALL_DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR})
164-
165-
write_basic_package_version_file(${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
166-
VERSION ${OpenVINO_VERSION_MAJOR}.${OpenVINO_VERSION_MINOR}.${OpenVINO_VERSION_PATCH}
167-
COMPATIBILITY SameMajorVersion)
168-
169-
install(FILES ${CMAKE_BINARY_DIR}/ngraphConfig.cmake
170-
${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
171-
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
172-
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
173-
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

src/inference/dev_api/blob_factory.hpp

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include "ie_blob.h"
1717
#include "ie_data.h"
1818
#include "ie_memcpy.h"
19+
#include "openvino/runtime/itensor.hpp"
20+
#include "openvino/runtime/so_ptr.hpp"
1921

2022
IE_SUPPRESS_DEPRECATED_START
2123
/**
@@ -137,4 +139,15 @@ void CopyVectorToBlob(const InferenceEngine::Blob::Ptr outputBlob, const std::ve
137139
IE_THROW() << "Element size mismatch between blob and vector";
138140
ie_memcpy(outputBlob->buffer().as<T*>(), outputBlob->byteSize(), &inputVector[0], inputVector.size() * sizeof(T));
139141
}
142+
143+
namespace ov {
144+
145+
ov::SoPtr<ov::ITensor> make_tensor(const std::shared_ptr<InferenceEngine::Blob>& tensor, bool unwrap = false);
146+
147+
OPENVINO_RUNTIME_API std::shared_ptr<InferenceEngine::Blob> tensor_to_blob(const ov::SoPtr<ov::ITensor>& tensor,
148+
bool unwrap = true,
149+
InferenceEngine::TensorDesc desc = {});
150+
151+
} // namespace ov
152+
140153
IE_SUPPRESS_DEPRECATED_END

0 commit comments

Comments
 (0)