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

NGraph FrontEnd Manager - Basic API #5470

Merged
merged 25 commits into from
Jun 1, 2021

Conversation

nosovmik
Copy link
Contributor

@nosovmik nosovmik commented Apr 29, 2021

Details:

  • NGraph FrontEnd Manager - Basic API
  • Plugin API for automatic discovery
  • Unit test + mock frontend

Tickets:

  • 52321, 54372, 54803

@nosovmik nosovmik requested review from mvafin, itikhono, slyalin and a team April 29, 2021 19:56
@openvino-pushbot openvino-pushbot added the category: Core OpenVINO Core (aka ngraph) label Apr 29, 2021
@nosovmik nosovmik marked this pull request as draft April 30, 2021 11:50
@nosovmik nosovmik force-pushed the fe_manager branch 2 times, most recently from bc2907c to fa893d3 Compare April 30, 2021 13:00
@nosovmik nosovmik marked this pull request as ready for review May 4, 2021 08:02
In case of unset or empty OV_FRONTENT_PATH - load plugins from current working directory
ngraph/CMakeLists.txt Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
ngraph/frontend/generic/CMakeLists.txt Outdated Show resolved Hide resolved
@ilyachur ilyachur self-requested a review May 26, 2021 17:06
@GlebKazantaev
Copy link
Contributor

GlebKazantaev commented May 28, 2021

Approving part that I have reviewed (everything except tests). Look like I need more details from @nosovmik or @slyalin about classes and methods purposes.

@ilyachur ilyachur self-requested a review May 28, 2021 13:03
@ilyachur
Copy link
Contributor

About frontend API, we had a long discussion with @slyalin and we need to have this PR in the master in order to unblock development of PDPD and ONNX frontends and get additional feedback from guys who will develop these frontends.
As I understand at the current moment @mvafin is developing new API to simplify read model and decrease the number of read methods in API.
And as I understood we need to review this API in the future.

Moreover I have some comments/concerns about the current API:

  • We need to show different cases and demonstrate which functionality should be implemented for all these cases or maybe change the granularity of classes in order to make interfaces for different scenarios more clear. We need to think about this API from the user side, which wants to contribute new frontend or reader to OpenVINO.
  • If we want to replace Reader API by Frontend API, we need to add a support of custom operations and other extensions.
  • If we merge it to the master branch, we need to double check that OV package doesn't have any files from this API.

@slyalin Please correct me if I forgot anything.

Moreover I highly recommend to split frontend_manager.hpp to several separate files.

@nosovmik
Copy link
Contributor Author

Moreover I highly recommend to split frontend_manager.hpp to several separate files.

This part is done

@nosovmik nosovmik removed the request for review from andrei-kochin June 1, 2021 15:05
@slyalin slyalin merged commit 5765a7e into openvinotoolkit:master Jun 1, 2021
@ilya-lavrenov ilya-lavrenov added this to the 2021.4 milestone Jun 1, 2021
nosovmik added a commit to nosovmik/openvino that referenced this pull request Jun 2, 2021
Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470
nosovmik added a commit to nosovmik/openvino that referenced this pull request Jun 2, 2021
Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470
yekruglov pushed a commit to yekruglov/openvino that referenced this pull request Jun 7, 2021
* NGraph - FrontEndManager - common API
Added Mock frontend for unit testing

* Comment out installation rules

* Fixed review comment
Introduced environment variable OV_FRONTEND_PATH for frontend paths

* Additional cmake cleanup

* More fixes of cmakelists

* Changing template file name for frontends

* Changed copyrights

* Reuse ngraph-utils for file-related operations

* Correct of frontend file extension for macos
More code coverage

* Renamed all methods to according to ngraph-style
In case of unset or empty OV_FRONTENT_PATH - load plugins from current working directory

* Fix review comments
Add clang format target for frontend_manager and mock frontend plugin

* Update docs for FrontEndCapabilities

* Use constants for flags instead of 'enum'

* clang style fix

* Fix comment: using namespace ngraph...

* Fix comment: use replace "frontend_manager" with ${TARGET_NAME} in CMakeLists.txt

* Comment fix: rename 'generic' folder to 'frontend_manager'

* Update documentation comments

* Set FrontEndManager class as 'final'

* Apply review comments

* renamed get_place_by_name_and... to get_place_by_operation_name_and...

* Separated frontend_manager.hpp into 4 header files
ilyachur pushed a commit that referenced this pull request Jun 22, 2021
* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR #5470

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR #5470

* Added docs + moved sources to 'pyngraph/frontend'

* Fix issues after rebase

* Fix clang

* Moving ngraph/python/tests_cpp to ngraph/python/tests/mock

* Fix cmakelists-related comments

* Apply review comments

* Added dots to docstrings

* Cmake - Set target properties for ARCHIVE/PDB/COMPILE_PDB as well as for LIBRARY_OUTPUT_DIRECTORY
lazarevevgeny pushed a commit that referenced this pull request Jun 24, 2021
* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR #5470

* Exposing 'Dimension' class to Python nGraph API

* Model optimizer code from pdpd_frontend

Removed 'use_legacy_frontend' option as not needed for PDPD integration

* Added XML/BIN prints for 'ngraph-FE' serialization path

* Update python bindings to latest code from PR #5995

* Add OV_FRONTEND_PATH to LD_LIBRARY_PATH by default for Model Optimizer

* Test with 'mock' frontend

* Added meta info to generated IR

Added more tests to cover currently supported scenarios
Clang config for MO mock frontend

* some flake8 and pylint fixes

* Try to 'import' ngraph-related packages on top of python files

This will help to specify type of function arguments, but can break unit tests if they're using functions directly without ngraph

* CI fixes

* Run tests from 'main_test.py' inside ngraph environment

* Fixed review comments

* Fixed comments
Added more tests for checking if inputs and outputs are same

* Renamed front_ng to moc_frontend

* Update package_BOM.txt
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
* NGraph - FrontEndManager - common API
Added Mock frontend for unit testing

* Comment out installation rules

* Fixed review comment
Introduced environment variable OV_FRONTEND_PATH for frontend paths

* Additional cmake cleanup

* More fixes of cmakelists

* Changing template file name for frontends

* Changed copyrights

* Reuse ngraph-utils for file-related operations

* Correct of frontend file extension for macos
More code coverage

* Renamed all methods to according to ngraph-style
In case of unset or empty OV_FRONTENT_PATH - load plugins from current working directory

* Fix review comments
Add clang format target for frontend_manager and mock frontend plugin

* Update docs for FrontEndCapabilities

* Use constants for flags instead of 'enum'

* clang style fix

* Fix comment: using namespace ngraph...

* Fix comment: use replace "frontend_manager" with ${TARGET_NAME} in CMakeLists.txt

* Comment fix: rename 'generic' folder to 'frontend_manager'

* Update documentation comments

* Set FrontEndManager class as 'final'

* Apply review comments

* renamed get_place_by_name_and... to get_place_by_operation_name_and...

* Separated frontend_manager.hpp into 4 header files
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
…oolkit#5995)

* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470

* Added docs + moved sources to 'pyngraph/frontend'

* Fix issues after rebase

* Fix clang

* Moving ngraph/python/tests_cpp to ngraph/python/tests/mock

* Fix cmakelists-related comments

* Apply review comments

* Added dots to docstrings

* Cmake - Set target properties for ARCHIVE/PDB/COMPILE_PDB as well as for LIBRARY_OUTPUT_DIRECTORY
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470

* Exposing 'Dimension' class to Python nGraph API

* Model optimizer code from pdpd_frontend

Removed 'use_legacy_frontend' option as not needed for PDPD integration

* Added XML/BIN prints for 'ngraph-FE' serialization path

* Update python bindings to latest code from PR openvinotoolkit#5995

* Add OV_FRONTEND_PATH to LD_LIBRARY_PATH by default for Model Optimizer

* Test with 'mock' frontend

* Added meta info to generated IR

Added more tests to cover currently supported scenarios
Clang config for MO mock frontend

* some flake8 and pylint fixes

* Try to 'import' ngraph-related packages on top of python files

This will help to specify type of function arguments, but can break unit tests if they're using functions directly without ngraph

* CI fixes

* Run tests from 'main_test.py' inside ngraph environment

* Fixed review comments

* Fixed comments
Added more tests for checking if inputs and outputs are same

* Renamed front_ng to moc_frontend

* Update package_BOM.txt
andrei-cv pushed a commit to andrei-cv/openvino that referenced this pull request Aug 30, 2021
* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR openvinotoolkit#5470

* Exposing 'Dimension' class to Python nGraph API

* Model optimizer code from pdpd_frontend

Removed 'use_legacy_frontend' option as not needed for PDPD integration

* Added XML/BIN prints for 'ngraph-FE' serialization path

* Update python bindings to latest code from PR openvinotoolkit#5995

* Add OV_FRONTEND_PATH to LD_LIBRARY_PATH by default for Model Optimizer

* Test with 'mock' frontend

* Added meta info to generated IR

Added more tests to cover currently supported scenarios
Clang config for MO mock frontend

* some flake8 and pylint fixes

* Try to 'import' ngraph-related packages on top of python files

This will help to specify type of function arguments, but can break unit tests if they're using functions directly without ngraph

* CI fixes

* Run tests from 'main_test.py' inside ngraph environment

* Fixed review comments

* Fixed comments
Added more tests for checking if inputs and outputs are same

* Renamed front_ng to moc_frontend

* Update package_BOM.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Core OpenVINO Core (aka ngraph)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants