-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[OpenVINO-EP] Update to latest version: OpenVINO 2019 R3.1 #2308
Changes from 2 commits
22ea900
846e243
f2b2810
5bb67f8
e5fe4c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -452,6 +452,14 @@ if(WIN32) | |
$<TARGET_FILE_DIR:${test_data_target}> | ||
) | ||
endif() | ||
if (onnxruntime_USE_OPENVINO) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this for same reason as python.cmake above. |
||
add_custom_command( | ||
TARGET ${test_data_target} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy | ||
${OPENVINO_CPU_EXTENSION_DIR}/${OPENVINO_CPU_EXTENSION_LIB} | ||
$<TARGET_FILE_DIR:${test_data_target}> | ||
) | ||
endif() | ||
if (onnxruntime_USE_NGRAPH) | ||
add_custom_command( | ||
TARGET ${test_data_target} POST_BUILD | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,11 +36,12 @@ RUN tar -xzf l_openvino_toolkit*.tgz && \ | |
cd - && \ | ||
rm -rf l_openvino_toolkit* && \ | ||
cd /opt/intel/openvino/install_dependencies && ./_install_all_dependencies.sh && dpkg -i *.deb && \ | ||
pip install networkx==2.3 test-generator==0.1.1 defusedxml>=0.5.0 | ||
pip install networkx==2.3 numpy>=1.12.0 test-generator==0.1.1 defusedxml>=0.5.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you revert this line as well? numpy>=1.12.0 isn't required. numpy is already installed as dependency earlier. |
||
|
||
ENV LD_LIBRARY_PATH=/opt/miniconda/lib:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH | ||
ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2019.1.144 | ||
ENV INTEL_CVSDK_DIR=/opt/intel/openvino_2019.1.144 | ||
ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2019.3.376 | ||
ENV INTEL_CVSDK_DIR=/opt/intel/openvino_2019.3.376 | ||
ENV InferenceEngine_DIR=${INTEL_CVSDK_DIR}/deployment_tools/inference_engine/share | ||
ENV IE_PLUGINS_PATH=${INTEL_CVSDK_DIR}/deployment_tools/inference_engine/lib/intel64 | ||
ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/cldnn/lib:${INTEL_OPENVINO_DIR}/inference_engine/external/gna/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/omp/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH} | ||
ENV OpenCV_DIR=${INTEL_OPENVINO_DIR}/opencv/share/OpenCV | ||
|
@@ -49,7 +50,8 @@ ENV PATH=${INTEL_CVSDK_DIR}/deployment_tools/model_optimizer:$PATH | |
ENV PYTHONPATH=${INTEL_CVSDK_DIR}/deployment_tools/model_optimizer:$PYTHONPATH | ||
ENV HDDL_INSTALL_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl | ||
ENV LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl/lib:$LD_LIBRARY_PATH | ||
|
||
RUN locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
|
||
RUN cd onnxruntime && ./build.sh --config RelWithDebInfo --update --build --parallel --use_openvino $DEVICE --build_wheel && \ | ||
pip install build/Linux/RelWithDebInfo/dist/*-linux_x86_64.whl && rm -rf /code/onnxruntime /code/cmake-3.14.3-Linux-x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this? For openvino, I don't think it's needed. for the others, the binaries get copied to the target location so they can be added to the onnxruntime python package.
for openvino, we expect the binaries to be installed on the host system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jywu-msft thanks for the feedback. The CPU extensions library, which is now required for the squeeze/unsqueeze operators, is a special case because the library is not installed with the OpenVINO binary and must be built separately. OpenVINO's setupvars.sh/bat file will add the path for all plugins with the exception of the CPU extensions, which is why it is being added to the python package (and the target directory for unit tests on windows).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see squeeze in the list of supported ops in OV EP https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/providers/openvino/openvino_execution_provider.cc#L159
Unsqueeze is there. Does this mean it wasn't really supported before? Or was support moved from CPU plugin to the CPU extensions library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I misspoke about the squeeze operator (it's not currently supported). Unsqueeze is the reason that the CPU extensions are required. The ONNX unsqueeze operator was previously supported, but the model optimizer in OpenVINO 2019 R1.1 and 2018 R5 converted it to the reshape operator in the OpenVINO IR, which is a layer handled by MKL-DNN with the main CPU plugin. In OpenVINO 2019 R3.1, the model optimizer maintains the ONNX unsqueeze operator as unsqueeze in the IR, an operator which is handled in the CPU extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. It's unfortunate we have to add this extension lib just for a single operator.
Is this a temporary situation? Will feature OV releases incorporate the extensions?