Commit Graph

180 Commits

Author SHA1 Message Date
Mateusz Tabaka
38bbc30a29 [ONNX] Fix memleak caused by shared_ptr cyclic dependency (#9236)
ONNXFrameworkNode had it own copy of shared_ptr<Graph> so in convert phase,
it can be used to produce real ngraph nodes (by graph->make_ng_nodes(..)).
But Graph also keeps ONNXFrameworkNodes in its cache and in consequence
its own shared_ptr, which is causing a dependency cycle.

This change removes shared_ptr<Graph> from ONNXFrameworkNode class
and moves it to decoded function runtime info, so Graph is in a single
place now and its lifetime ends when decoded function is destroyed.
2021-12-15 21:24:35 +01:00
Yegor Kruglov
5c0b125554 Softmax-8 python API (#9057)
* added ngraph api for softmax-8

* Updated comments
2021-12-14 16:25:23 +03:00
Katarzyna Mitrus
3efe5b312e [ONNX] Tests manifest and xfails cleanup (#9133) 2021-12-14 12:40:02 +03:00
Dawid Kożykowski
6ad627d60c [PYTHON] Add missing index operator bindings (#9088) 2021-12-14 00:46:37 +03:00
Anastasia Popova
c39dba62b0 Partial shape serialization and deserialization in nGraph (#8859)
* Added support of partial shape serialization and deserialization.

* Small correction.

* Conflicts resolve.

* Clang-format.

* Fixed checks.

* Added partial shape, dimension support in visitor.

* Code style.

* Code style.

* Fixed IR reader parameter extender for partial shape.

* Moved IR reader changes to MO PR.

* Added rank check.

* Fixed dimension test.

* Code refactoring.

* Undo refactor.

* Code style

* Removed unnecessary code changes from cnn network.

* Extended visitor tests for PartialShape.

* Code style

* Removed code duplications, added dynamic rank test.

* Code style.

* Added negative tests for deserialization.

* Align with changes on master.

* Changed ov::Function to ov::Model.

* Fixed tests.

* Small fix.

* Fixed tests.

* Code style.
2021-12-14 00:09:45 +03:00
Ilya Churaev
37b0b6f7c8 Renamed ExecutableNetwork to CompiledModel (#9144)
* Renamed ExecutableNetwork to CompiledModel

* Fixed python

* Fixed comments

* Fixed build

* Fixed code style
2021-12-11 16:11:15 +03:00
Mateusz Tabaka
0c68574aa7 Fix compilation error in pyopenvino (#9150) 2021-12-10 14:01:44 +03:00
Artur Kulikowski
d6c2cb5238 Python Api, Variant -> OVAny (#9084) 2021-12-10 11:32:25 +01:00
Ilya Churaev
ec6f57872f Renamed ov::Function to ov::Model (#9051)
* Renamed ov::Function to ov::Model

* Fixed all for macos

* Fixed build

* Fixed build

* Revert changes in GPU plugin

* Fixed ngraphFunctions

* Fixed all for mac

* Fixed new test

* Fixed if for Windows

* Fixed unit tests and renamed Function in python API

* Fixed code style

* Fixed import

* Fixed conflict

* Fixed merge issues
2021-12-10 13:08:38 +03:00
Bartek Szmelczynski
68d460a3bb [PYTHON] Expose set_batch and get_batch (#9093) 2021-12-10 10:18:56 +01:00
Anastasia Kuporosova
8453b6395a [Python API] Bind test_utils (#8549)
* [Python API] Bind test_utils

* fix building

* fix building

* fix codestyle

* fix codestyle

* try to fix merging

* Update __init__.py

* fix azure jobs

* fixes after master merge

* fix importing

* try to fix import

* Fix array out-of-bounds error (#8966)

* try to fix

* fix building

* fix code style

* undo some changes after rebase

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>
2021-12-09 15:07:12 +03:00
Katarzyna Mitrus
a787fade68 [Python API] Move openvino.runtime.impl to openvino.runtime (#9096) 2021-12-09 10:40:22 +01:00
Tomasz Dołbniak
f9949b4140 Alignment of OV and ONNX models outputs naming (#7691)
* Alignment of OV and ONNX models outputs naming

* Python tests adaptation to new naming rules

* New output naming rules

* Output name retrieval adaptation (tensor iterator node)

* Copying of tensor names during output replacement

* Multiout multinode subgraphs handling in the importer

* Proper replacement tensor naming

* Model zoo test runner adaptation

* Backwards compatible python tests runner adaptation

* If node adaptation

* Adaptation to changes in master

* Deprecation warning suppression

* Imports fix in compatibility tests

* If node adaptation to the new naming

* MaxPool python tests re-enabled

* ONNX Identity elimination adaptation

* XFAIL for the Identity op test

* Support for Param->Result models and indentity op

* Fix of the ONNX Indentity handling

* The test that fails only on windows temporarily disabled

* ONNX tensor names test adaptation

* Code cleanup

* Code formatting

* Obsolete helper removal

* One more spot where output name helper should be used

* PyApi fix for tensors with multiple names

* Don't set friendly names for unnamed ONNX nodes

* Revert "Don't set friendly names for unnamed ONNX nodes"

This reverts commit 92c7ac59b5.

* Missing dot...

* And now the mypy nonsense...

* Use get_any_name in Loop

* New way of naming result nodes in ONNX FE
2021-12-09 11:16:50 +03:00
Artur Kulikowski
64c6ca05ed [Python API] Binding ov::Any (#8996) 2021-12-08 09:34:31 +01:00
Mikhail Nosov
20bf5fcc4a Rename "network" to "model" in preprocessing API (#9054) 2021-12-07 19:26:27 +03:00
Mikhail Nosov
70b5e28979 [OV20] InputTensorInfo::set_shape (#9059)
* InputTensorInfo::set_shape

* Fix clang-format
2021-12-07 19:13:38 +03:00
Anton Pankratov
9a5b911856 Variant replaced with Runtime Attribute (#8520) 2021-12-07 13:02:31 +03:00
Roman Kazantsev
42892767f5 [MO, nGraph, transforms., ref., python] Support DetectionOutput-8 (#8853)
* Implement MO part for DetectionOutput-8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement nGraph part for DetectionOutput-8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement deduction of a number of classes method

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix build

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement nGraph tests to check shape inference for DetectionOutput-8 with deduction of num_classes

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement attributes tests for DetectionOutput-8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Remove DetectionOutput-1 from opset8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add python bindings for DetectionOutput-8 and tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement downgrading and upgrading transformations for DetectionOutput

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Implement tests for downgrading and upgrading transformations for DetectionOutput

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Adopt existing reference for DetectionOutput-8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix DetectionOutput-8 reference

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add tests for DetectionOutput-8 reference

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Finish resolving merge conflict

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix python bindings after re-structuring

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix BOM package list

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix multibox_detection_test

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix python bindings for DetectionOutput-8

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Insert blank line between summary and description for python binding

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply review comments: identation, for loop

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix formatting in python bindings

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix supported_attrs for DetectionOutput from opset1

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add missed imports for python if_op

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback and fix Win build

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Use the same test suite name for test mixture

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix transformation tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Recover BWDCMP_RTTI for legacy use and remove unused variables in tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Remove unused variables in type_prop tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Recover legacy referenceDetectionOutput constructor

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix python binding for DetectionOutput

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-12-07 01:17:49 +03:00
Piotr Szmelczynski
b65a14d587 include api changes (#8837)
* include api changes

* include api changes for executable_network

* Create InferVec container

* update infer method

* update infer methods in ie_api

* update runtime to work with dict

* update infer_engine test to work with infer returning dict

* remove inferMap container

* add return type to infer and infer_new_request in ie_api

* add auto to infer loops

* fix typo

* change OrderedDict to dict

* change infer methods return type to dict

* update infer methods to return py::dict

* style fix

* create helper function outputs_to_dict

* remove InferMap and InferVec

* remove unused imports

* add const to outputs

* add get_result method

* add test for get_results

* style fix

* add reference to outputs_to_dict parameters

* remove blank line

* fix style

* change get_results method to result property

* code fix in ie_api

* add f16 and bf16 support to outputs_to_dict function

* update the way of receiving keys from dict

* update the way of key receive in test_core

* add test for reslts attribute for async infer

* remove out of date comment

* add view(int16) to bf16 and f16 in outputs_to_dict() function
2021-12-07 00:51:01 +03:00
Katarzyna Mitrus
a7af80d46b [Python API] Add opset8 ops: i420toBGR-8, i420toRGB-8, NV12toBGR-8, NV12toRGB-8 (#8987) 2021-12-06 11:26:21 +01:00
Bartek Szmelczynski
9b69705158 Serialize pass bind (#8749)
* add pass for serialize, add tests

* remove redundant code

* fix style

* add tuple functionality, clear code, add tests

* style changes

* fix style

* add runtime.Core to the imports

* add version arg to serialize pass, add tests
2021-12-06 11:10:20 +03:00
Dawid Kożykowski
d6094a085a Expose missing Node API (#8852) 2021-12-03 18:53:19 +01:00
Alexey Lebedev
4e6eeea6ff [PYTHON API] move frontend bindings to pyopenvino + move MO to use new Python API (#8301)
* move frontend folder to pyopenvino

* rename includes and add compile options

* include frontend to pyopenvino

* move __init__.py

* move tests

* remove mock from tests_compatibility

* rename import module

* Fix code style cpp

* refactor a few lines

* update few lines in mo

* Add pyopenvino to dependencies

* Fix mock

* update docstring

* Fix mo test

* remove module local

* fix code style

* update comment

* fix return type

* update docs

* fix code style

* fix building

* fix code style

* try to move MO to use new api

* Export more enum names from nrgaph

* [Python API] quick fix of packaging

* update tests

* fix setup.py

* small fix

* small fixes according to comments

* skip mo frontend tests

* update mo to new imports

* try to fix win wheel

* fix win wheel

* fix code style

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
Co-authored-by: y <ilya.lavrenov@intel.com>
2021-12-01 21:31:16 +03:00
Eugeny Volosenkov
81b003e688 Python API for If operation (#7934)
* add if in python_api

* add test for if python api

* fix code style

* fix typr of output_desc

* move to ne api

* Revert "add if in python_api"

This reverts commit fca6e5a449.

* Revert compatibility if_op

* fix codestyle

* add new tests, disable test where bug is appear

* fix codestyle

* fix test

* rewrite interface if python_api

* fix dict_attribute_visitor.cpp

* fix codestyle

* fix codestyle

* update dict_attribute_visitor.cpp

* add comapti

* add compatibilty tests

* fix if_op description, and paths

* add compatible test

* fix comp opset

* fix opset 8 whitespace

* fix codestyle

* fix tests

* delete old tests

* Revert fixes in test_reduction.py, test_node_factory.py

* Revert fixes in test_reduction.py, test_node_factory.py

* fix tuple

* fix tuple

* fix tuple

* fix tuple

* fix test path

* fix test path
2021-12-01 18:07:02 +03:00
Alexey Lebedev
246e628c79 [PYTHON API] fix tensor naming (#8918)
* bind any_names

* Update src/bindings/python/src/pyopenvino/graph/node_output.hpp

Co-authored-by: Jan Iwaszkiewicz <jan.iwaszkiewicz@intel.com>

* add properties and tests

Co-authored-by: Jan Iwaszkiewicz <jan.iwaszkiewicz@intel.com>
Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2021-12-01 14:57:24 +03:00
Bartek Szmelczynski
f211749e15 Expose enum version (#8893)
* add version param to offline_transofmations serialize

* fix style

* fix style

* remove redundant commented code
2021-12-01 13:49:28 +03:00
Anastasia Kuporosova
184b602a49 [Python API] Remove DescriptorTensor constructor (#8903) 2021-12-01 02:09:25 +03:00
Alexey Varyzgin
9b6b184e5e [CPU] Native 1D models support (#8168) 2021-11-30 15:30:53 +03:00
Anastasia Kuporosova
f6df0a9c13 [Python API] quick fix of packaging (#8870)
* [Python API] quick fix of packaging

* update tests

* fix setup.py

* small fix

* small fixes according to comments

* skip mo frontend tests
2021-11-30 12:28:34 +03:00
Ilya Churaev
b1fba3a675 Rename runtime to src (#8842)
* Renamed runtime to src

* Removed old paths

* Fixed cmake

* Fixed doc
2021-11-27 11:28:25 +03:00