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

Ort openvino npu 1.17 master #19966

Merged
merged 59 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9e9c1fb
Add OpenVINO 2023.2 support
sspintel Mar 13, 2024
f71ca3a
num_of_threads mapped to inference_num_threads property of CPU
sspintel Mar 13, 2024
b656d06
Use ONNX FrontEnd convert_model to facilitate external weights path
sspintel Mar 13, 2024
cce97c0
Fix Lint issues
sspintel Mar 13, 2024
babc244
inference_num_threadas is applicable only for the CPU device
sspintel Mar 13, 2024
b6e4af0
Fix Lint issues
sspintel Mar 13, 2024
6b8c867
Add an user option to disable default dynamic model execution for im…
preetha-intel Mar 13, 2024
4f7fe28
Fix for runtime errors with dynamic shapes flag
sspintel Mar 13, 2024
6704415
Fix conflict in gitignore
sspintel Mar 13, 2024
359b71b
Revert removal of USE_OPENVINO macro in provider registration; Add ch…
sspintel Mar 13, 2024
fb6d981
Enable OV CPU fallback for NPU compilation failures
preetha-intel Mar 13, 2024
d2879b9
Add NPU device in supported list of openvino devices
preetha-intel Mar 13, 2024
b7db23f
Handle dynamic shapes fallback for NPU to OV CPU
preetha-intel Mar 13, 2024
08f5b8c
Remove NPU operator from static mapping
preetha-intel Mar 13, 2024
d9fe4c1
Add NPU device; Revert num_of_threads to 1 to be default
sspintel Mar 13, 2024
ff7070b
Add support for LayerNormalization Op; NPU to go through ReadModel ->…
Mar 13, 2024
b4b2c59
Fix an issue with provider options getting overwritten
sspintel Mar 13, 2024
4121684
Add device_precision access for UnsupportedOpModes
sspintel Mar 13, 2024
e8fd60a
Fix an issue that shared global_context across subgraphs
sspintel Mar 13, 2024
439afd3
Remove static mapping of LayerNorm op for the NPU; Remove unused MLAS…
sspintel Mar 13, 2024
593d870
Add support for UINT16 DTYPE in initializers, NPU, and CPU devices
sspintel Mar 13, 2024
de8194c
Temporarily disable model domain check as it is yet to be supported b…
sspintel Mar 13, 2024
8fe5760
Allow overriding NPU compiler type through an environmental variable
sspintel Mar 13, 2024
281ddf6
Remove deprecated model domain check
sspintel Mar 13, 2024
49d7f4a
Remove unused parameter op_map
sspintel Mar 13, 2024
0466f29
Enable dynamic backend execution for NPU
preetha-intel Mar 13, 2024
e4cc1c9
OV NPU fallback for OV CPU
preetha-intel Mar 13, 2024
da26118
The default should be false
hmamidix Mar 13, 2024
6adbc90
Resetting num of threads to 0
hmamidix Mar 13, 2024
16c9a3e
Nuget does not need openvino windows dll
vthaniel Mar 13, 2024
4b78e50
Bug fix with dynamic backend key
preetha-intel Mar 13, 2024
cbbcf43
Update Cmake to latest OV libs (#343)
preetha-intel Mar 13, 2024
0ff4b4f
add gelu op for ps* models
saurabhkale17 Mar 13, 2024
8d0b825
OV deprecated api
saurabhkale17 Mar 13, 2024
c7112f4
Remove deprecated code comments
vthaniel Mar 13, 2024
953398f
Update get_capability of OVEP
preetha-intel Mar 13, 2024
543247c
Add a cmake option to install openvino providers library in a desire…
sspintel Mar 13, 2024
e211110
Throw useful Exceptions from OVEP
sspintel Mar 13, 2024
7e75c9f
Use std::runtime_error instead of ov::Exception in basic_backend
sspintel Mar 13, 2024
698333e
Fix Unknown Exceptions arising from ov_interface.cc
sspintel Mar 13, 2024
b4e8838
Apply lintrunner patches
Mar 13, 2024
9d7892f
Rename OVEP device for NPU without precision
preetha-intel Mar 13, 2024
b9506a9
Add Capability for OV 2024.0
sspintel Mar 13, 2024
ea4001b
Remove unsupported Op LpPool; GridSample com.microsoft supported only…
sspintel Mar 13, 2024
5d77fe3
Disable ONNX_Gelu UT; Apply lintrunner
sspintel Mar 13, 2024
56ce6fb
Remove Dockerfiles for OpenVINO
sspintel Mar 13, 2024
04cf70e
Revert "Remove Dockerfiles for OpenVINO"
sspintel Mar 13, 2024
9f98cdb
Remove and Update OpenVINO EP Dockerfiles
sspintel Mar 13, 2024
8340059
Provide backward compatability for OVEP API in python
preetha-intel Mar 7, 2024
4888eb1
Fix fallback failure by catching the correct exception type (#353)
sspintel Mar 18, 2024
0ba959a
Apply lintrunner patch
sspintel Mar 19, 2024
ac0762f
Remove Date from Licence File Information
sfatimar Mar 20, 2024
2eea77a
Fixed OpenVINO Dockerfile
sfatimar Mar 20, 2024
514d0c1
Merge pull request #354 from intel/sahar/fix_npu_pr_19666
sfatimar Mar 20, 2024
a96e123
Pointing to OpenVINO 2024.0.0
sfatimar Mar 20, 2024
2a6397e
Merge branch 'ort-openvino-npu-1.17-master' of https://github.com/int…
sfatimar Mar 20, 2024
9d72346
Disable ActivationOpTest.Gelu for OpenVINO
sspintel Mar 21, 2024
3eaa70a
Ignore Gelu tests in ONNX Backend test
sspintel Mar 21, 2024
76d7e17
Merge pull request #355 from intel/sp/ignore-gelu-tests-python
sfatimar Mar 21, 2024
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
37 changes: 9 additions & 28 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1290,34 +1290,6 @@ if (onnxruntime_USE_OPENVINO)

add_definitions(-DUSE_OPENVINO=1)

if (EXISTS "$ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/version.txt")
file(READ $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/version.txt VER)
endif()

if (NOT DEFINED ENV{INTEL_OPENVINO_DIR})
message(FATAL_ERROR "[Couldn't locate OpenVINO] OpenVINO may not have been initialized")
endif()

# Check OpenVINO version for support
if ($ENV{INTEL_OPENVINO_DIR} MATCHES "2023.0")
set(OPENVINO_VERSION "2023.0")
add_definitions(-DOPENVINO_2023_0=1)
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2023.1")
set(OPENVINO_VERSION "2023.1")
add_definitions(-DOPENVINO_2023_1=1)
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2023.2")
set(OPENVINO_VERSION "2023.2")
add_definitions(-DOPENVINO_2023_2=1)
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2023.3")
set(OPENVINO_VERSION "2023.3")
add_definitions(-DOPENVINO_2023_3=1)
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "openvino")
set(OPENVINO_VERSION "2023.3")
add_definitions(-DOPENVINO_2023_3=1)
else()
message(FATAL_ERROR "Unsupported OpenVINO version: ${INTEL_OPENVINO_DIR}")
endif()

if (onnxruntime_USE_OPENVINO_GPU_FP32)
add_definitions(-DOPENVINO_CONFIG_GPU_FP32=1)
endif()
Expand All @@ -1334,6 +1306,10 @@ if (onnxruntime_USE_OPENVINO)
add_definitions(-DOPENVINO_CONFIG_CPU_FP16=1)
endif()

if (onnxruntime_USE_OPENVINO_NPU)
add_definitions(-DOPENVINO_CONFIG_NPU=1)
endif()

if (onnxruntime_USE_OPENVINO_GPU_FP32_NP)
add_definitions(-DOPENVINO_CONFIG_GPU_FP32=1)
add_definitions(-DOPENVINO_DISABLE_GRAPH_PARTITION=1)
Expand All @@ -1354,6 +1330,11 @@ if (onnxruntime_USE_OPENVINO)
add_definitions(-DOPENVINO_DISABLE_GRAPH_PARTITION=1)
endif()

if (onnxruntime_USE_OPENVINO_NPU_NP)
add_definitions(-DOPENVINO_CONFIG_NPU=1)
add_definitions(-DOPENVINO_DISABLE_GRAPH_PARTITION=1)
endif()

if (onnxruntime_USE_OPENVINO_HETERO)
add_definitions(-DOPENVINO_CONFIG_HETERO=1)
add_definitions(-DDEVICE_NAME="${onnxruntime_USE_OPENVINO_DEVICE}")
Expand Down
27 changes: 15 additions & 12 deletions cmake/onnxruntime_providers_openvino.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,19 @@
endif()

# Header paths
find_package(InferenceEngine REQUIRED)
find_package(ngraph REQUIRED)

if (OPENVINO_2022_1 OR OPENVINO_2022_2)
find_package(OpenVINO REQUIRED COMPONENTS Runtime ONNX)
list (OV_20_LIBS openvino::frontend::onnx openvino::runtime)
if(OpenVINO_VERSION VERSION_LESS 2023.0)
message(FATAL_ERROR "OpenVINO 2023.0 and newer are supported. Please, latest OpenVINO release")
endif()

if (WIN32)
unset(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO)
endif()

list(APPEND OPENVINO_LIB_LIST openvino::frontend::onnx openvino::runtime ${PYTHON_LIBRARIES})
if ((DEFINED ENV{OPENCL_LIBS}) AND (DEFINED ENV{OPENCL_INCS}))
add_definitions(-DIO_BUFFER_ENABLED=1)
list(APPEND OPENVINO_LIB_LIST $ENV{OPENCL_LIBS} ${OV_20_LIBS} ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} ngraph::onnx_importer ${PYTHON_LIBRARIES})
else()
list(APPEND OPENVINO_LIB_LIST ${OV_20_LIBS} ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} ngraph::onnx_importer ${PYTHON_LIBRARIES})
list(APPEND OPENVINO_LIB_LIST $ENV{OPENCL_LIBS})
endif()

source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_openvino_cc_srcs})
Expand Down Expand Up @@ -75,7 +71,14 @@
message(FATAL_ERROR "onnxruntime_providers_openvino unknown platform, need to specify shared library exports for it")
endif()

install(TARGETS onnxruntime_providers_openvino
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if (CMAKE_OPENVINO_LIBRARY_INSTALL_DIR)
install(TARGETS onnxruntime_providers_openvino
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_OPENVINO_LIBRARY_INSTALL_DIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
install(TARGETS onnxruntime_providers_openvino
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
6 changes: 3 additions & 3 deletions dockerfiles/Dockerfile.openvino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#-------------------------------------------------------------------------
# Copyright(C) 2021-2023 Intel Corporation.
# Copyright(C) 2021-2024 Intel Corporation.
# SPDX-License-Identifier: MIT
#--------------------------------------------------------------------------

ARG OPENVINO_VERSION=2023.0.0
jywu-msft marked this conversation as resolved.
Show resolved Hide resolved
ARG OPENVINO_VERSION=2024.0.0


# Build stage
Expand All @@ -17,7 +17,7 @@ ARG DEVICE=CPU_FP32
ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime.git
ARG ONNXRUNTIME_BRANCH=main

ENV InferenceEngine_DIR=${INTEL_OPENVINO_DIR}/runtime/cmake
ENV OpenVINO_DIR=${INTEL_OPENVINO_DIR}/runtime/cmake

USER root
RUN apt update; apt install -y git protobuf-compiler libprotobuf-dev
Expand Down
105 changes: 0 additions & 105 deletions dockerfiles/Dockerfile.openvino-centos7

This file was deleted.

90 changes: 0 additions & 90 deletions dockerfiles/Dockerfile.openvino-csharp

This file was deleted.

Loading
Loading