Skip to content

Openvino cmake config#7419

Merged
azhogov merged 39 commits intoopenvinotoolkit:masterfrom
ilya-lavrenov:openvino-cmake-config
Sep 10, 2021
Merged

Openvino cmake config#7419
azhogov merged 39 commits intoopenvinotoolkit:masterfrom
ilya-lavrenov:openvino-cmake-config

Conversation

@ilya-lavrenov
Copy link
Copy Markdown
Contributor

@ilya-lavrenov ilya-lavrenov commented Sep 8, 2021

Details:

# FindOpenVINO
# ------
#
# Provides OpenVINO runtime for model creation and inference, frontend libraries
# to convert models from framework specific formats.
#
# The following components are supported:
#
#  * `Runtime`: OpenVINO C++ and C Core & Inference Runtime, frontend manager
#  * `ONNX`: OpenVINO ONNX frontend
#  * `PaddlePaddle`: OpenVINO PaddlePaddle frontend
#
# If no components are specified, `Runtime` component is provided:
#
#   find_package(OpenVINO REQUIRED) # only Runtime component
#
# If specific components are required:
#
#   find_package(OpenVINO REQUIRED COMPONENTS Runtime ONNX)
#
# Imported Targets:
# ------
#
#  Runtime targets:
#
#   `openvino::runtime`
#   The OpenVINO C++ Core & Inference Runtime
#
#   `openvino::runtime::c`
#   The OpenVINO C Inference Runtime
#
#   `openvino::core`
#   The OpenVINO C++ Core Runtime
#
#  Frontend specific targets:
#
#   `openvino::frontend::manager`
#   OpenVINO frontend manager
#
#   `openvino::frontend::onnx`
#   ONNX FrontEnd target (optional)
#
#   `openvino::frontend::paddlepaddle`
#   PaddlePaddle FrontEnd target (optional)
#
# Result variables:
# ------
#
# The module sets the following variables in your project:
#
#   `OpenVINO_FOUND`
#   System has OpenVINO Runtime installed
#
#   `OpenVINO_Runtime_FOUND`
#   OpenVINO C++ Core & Inference Runtime is available
#
#   `OpenVINO_Frontend_ONNX_FOUND`
#   OpenVINO ONNX frontend is available
#
#   `OpenVINO_Frontend_PaddlePaddle_FOUND`
#   OpenVINO PaddlePaddle frontend is available
#
#  OpenVINO version variables:
#
#   `OpenVINO_VERSION_MAJOR`
#   Major version component
# 
#   `OpenVINO_VERSION_MINOR`
#   minor version component
#
#   `OpenVINO_VERSION_PATCH`
#   Patch version component
#

Tickets:

  • TODO

@ilya-lavrenov ilya-lavrenov added this to the 2022.1 milestone Sep 8, 2021
@ilya-lavrenov ilya-lavrenov added category: build OpenVINO cmake script / infra category: inference OpenVINO Runtime library - Inference labels Sep 10, 2021
@ilya-lavrenov ilya-lavrenov marked this pull request as ready for review September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team as a code owner September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested review from a team September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team as a code owner September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested review from a team and andrew-zaytsev and removed request for a team September 10, 2021 11:08
# Run tests via tox
WORKDIR /openvino/runtime/bindings/python
ENV ngraph_DIR=/openvino/dist/deployment_tools/ngraph
ENV OpenVINO_DIR=/openvino/dist/deployment_tools/inference_engine/share
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a temporary change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenVINO_DIR is permanent, path will be changed in future.

include("${CMAKE_CURRENT_LIST_DIR}/InferenceEngineTargets.cmake")

# create targets with old names for compatibility
if(TARGET IE::runtime AND NOT TARGET IE::inference_engine)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change prefix to OV? OV::runtime

#
# The following components are supported:
#
# * `Runtime`: OpenVINO C++ and C Core & Inference Runtime, frontend manager
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a Core as a separate component?

#
# The module sets the following variables in your project:
#
# `OpenVINO_FOUND`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if user wants to use nGraph without the runtime?

include("${CMAKE_CURRENT_LIST_DIR}/ngraphTargets.cmake")

# create targets with old names for compatibility
if(TARGET ngraph::core AND NOT TARGET ngraph::ngraph)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not openvino::core?

@azhogov
Copy link
Copy Markdown

azhogov commented Sep 10, 2021

@azhogov azhogov merged commit a952540 into openvinotoolkit:master Sep 10, 2021
@ilya-lavrenov ilya-lavrenov deleted the openvino-cmake-config branch September 10, 2021 12:33
akuporos pushed a commit to akuporos/openvino that referenced this pull request Sep 29, 2021
* Added OpenVINOConfig.cmake

* OpenVINOConfig.cmake part 2

* Trying to fix cmake generation

* Fixes

* Export frontends as well

* Fixed condition

* Added OpenVINO cmake package usage: docs, C samples

* Use more OpenVINO config

* Install OpenVINOConfig.cmake

* Trying to fix private plugins

* Trying to fix .tox

* Trying to fix ARM

* Fixed samples build

* Explicit ngraph duplicated targets

* Fixed fuzzing tests build

* Added IR frontend installation

* Removed install directory for IE reader

* Removed IR frontend from export list

* Reverted ngraph_DIR

* Try to fix .tox

* Fixed ieFuncTests with ONNX extensions

* Attempt #2

* Trying to fix ngraph setup.py

* Fix

* Trying to fix ONNX ngraph .tox CI

* Trying to remove spaces

* Fixed ngraph_DIR -> OpenVINO_DIR

* Removed junk files

* Try to fix ngraph wheel

* Try to fix ie_wheel

* Try to fix ngraph wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build OpenVINO cmake script / infra category: inference OpenVINO Runtime library - Inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants