Commit Graph

61 Commits

Author SHA1 Message Date
Jan Iwaszkiewicz
e1696deb3a [PYTHON] Expose If, Loop and TensorIterator API (#9603) 2022-01-14 14:30:30 +01:00
Mikhail Nosov
fc6eff048f Python bindings: expose InputTensorInfo::set_memory_type (#9608)
* Exposing set_memory_type method

* Update quotes
2022-01-13 12:48:26 +03:00
Mikhail Nosov
896532ace2 [OV2.0] PrePostProcessor dump to output stream for debugging purposes (#9580)
* Calculate model layout based on 'tensor' layout and convert steps

Previously, 'model layout' is set to '...' by default,
thus no shape conversion happened when tensor layout is set to 'NHWC', then there was explicit convert_layout "NCHW"

Now "model layout" is calculated based on tensor layout and conversion steps:
Examples:
 1) Tensor: NHWC, Convert: NCHW. Result: NCHW
 2) Tensor: NHWC, Convert: 0312. Result: NCHW

* Initial move of tensor data calculation

* Moved 'impls' to new file

* Postprocessing + unit tests

* clang-format fix

* Added more details to preprocessing nodes
- Mean/Scale - will print mean/scale values
- Convert type - will print type
- Convert layout - will print destination layout
- Convert color - will print destination color

It is needed to troubleshoot the problems. If error occurs, message will not display last op's target shape/layout/type

* Add python bindings

* update tests

* Added memory type to dump if set

* Code style fix

* unity build fix

* Dump tensor if only memory type is set

* Added debug print

* Fix Param->Result case

Previously, layout was set by preprocessing set to old parameter as well
This is incorrect because in case of exception layout info will not be reverted

In this case old Result pointed to old Parameter and was able to preserve runtime info

After fixing of this, case Param->Result was broken if revalidation is not triggerred

Fix is to detect 'Result' as a consumer of some parameter and force revalidation in this case

* Revert occasionally committed line

* And one more line
2022-01-12 22:00:32 +03:00
Alexey Lebedev
4a6575b4b7 [PYTHON API] fix direct access to model input shape (#9562)
* Copy port shape to avoid direct access to shape buffer

* Add __eq__ for shape

* Add tests

* Fix getters

* add __setitem__

* Add a note about copy
2022-01-12 17:48:10 +03:00
Alexey Lebedev
42c5be23b1 [PYTHON API] infer helper (#9478)
* inputs as list in infer

* fix import

* fix import 2

* refactor test
2022-01-11 16:12:11 +03:00
Alexandra Sidorova
af105b86f8 [CPU] Fixed Replicate via ov::Model (#9252) 2022-01-10 17:51:33 +03:00
Dawid Kożykowski
e89db1c6de Fix "Unexpected number of outputs after override_all_outputs" (#9454) 2022-01-05 12:10:16 +01:00
Alexey Lebedev
339849fde8 [PYTHON API] add_extension api (#9339)
* Pass ov::extension in core.add_extension

* fix code style

* revert mock and inherit extension on python side

* Fix code style

* Enable add_extension test

* Fix code style

* Move Extension to openvino.runtime

* use static_cast instead c-cast

* Fix code style

* fix test
2022-01-04 13:54:15 +03:00
Alexey Lebedev
de136a6515 [PYTHON API] fix model inputs and outputs property (#9407)
* fix inputs.property and add tests for reshape

* add is_instance in test

* fix code style
2021-12-24 16:42:48 +03:00
Alexandra Sidorova
91945ba122 [CPU] Added dynamism support for TensorIterator (#8879) 2021-12-24 15:08:42 +03:00
Ilya Churaev
d1fd0d259e Introduce get|set_layout helpers (#9401)
* Introduce get|set_layout helpers

* Added python tests and fixed comments

* Added non constant methods

* Update src/bindings/python/tests/test_ngraph/test_basic.py

Co-authored-by: Alexey Lebedev <alexey.lebedev@intel.com>

* Fixed tests

* FIxed code style

* Fixed func tests

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Alexey Lebedev <alexey.lebedev@intel.com>
2021-12-24 14:24:09 +03:00
Mikhail Nosov
7bfbb46d73 [FE API]: Shared object (SO) holder to frontend's library for FrontEnd/InputModel/ov::Model (#9308)
* Squashed commit of previous work

* Fix mock tests

* clang

* Fix rebase errors

* remove unnecessary changes

* One more finding

* Copy ov::Model runtime info as well

* Fix review comments

* Commit missing file

* Copy m_shared_object when cloning model

* removed copy_shared_objects and use clone_model(model, NodeMap) as a friend for ov::Model

* Added OPENVINO_API to forward declaration

* add OPENVINO_API to friend function declaration
2021-12-24 02:56:45 +03:00
Vladislav Volkov
60a11a6348 [CPU] Renamed CPU plugin to ov_intel_cpu_plugin (#9342) 2021-12-23 11:49:25 +03:00
Szymon Durawa
1fbfd426f0 Add FE add_output with tests. (#7644) 2021-12-23 09:04:37 +01:00
Katarzyna Mitrus
b7750f8f0d [ONNX][PYTHON API] FLOAT_LIKE_xfail - Enable bfloat16 onnx tests (#9291) 2021-12-22 12:23:50 +01:00
Bartek Szmelczynski
8a1fd76124 [PYTHON] Expose get_rt_info method for input/output nodes (#9211)
* expose get_rt_info method for input/output nodes

* expose rt_info

* add tests with rf_info update

* remvoe redundant import

* rename PyRTMap to RTMap
2021-12-22 10:55:57 +03:00
Tingqian Li
b8e6b6368c [Shape inference] Pad_1/Topk_3/Split_1/VariadicSplit_1/ExperimentalDetectronROIFeatureExtractor_6/Bucketize_3/EmbeddingBagOffsetsSum_3/EmbeddingSegmentsSum_3/Range_4/RegionYolo_0/ReorgYolo_0 (#8413)
* [shape_infer] add shape_infer for ExperimentalDetectronROIFeatureExtractor op

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* add test

* Use compatible & merge for intersection checks

* Update

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Add perf_test

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Initial commit

* fix compile issue

* Add test

* fix clang format issue

* support for pads_begin/pads_end with different sizes

* fix bug in EDGE mode checking

* fix padding mode checks

* fix according to jane's review comment

* fix const reference

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Initial commit

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* fix bugs

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Switch to use single generic code with small helper template

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Initial commit on Split

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Convolution update

* Adds pragma once

* Reductions shape infer

* Shape nodes

* style

* Update

* add exp detectron roi feature

* Update

Signed-off-by: Li, Tingqian <tingqian.li@intel.com>

* Use get_data_as_int64 + constant_data

* Add test

* Add utils.hpp into cpuUnit shape inference test

* avoid using friend template function

* fix topk axis bug

* Add bucketize

* Add embeddingbag offsets sum

* Add embedding segments sum

* fix code style issue

* Add Range_4

* Update tests

* Add range

* Add region Yolo

* Add reorg

* fix according to Globev's comment

* call shape_infer in evaluate_variadic_split()

* fix CI issue

* fix CI issue

* fix CI issue, topk change revert

* fix flake8 E302

* fix myriad smoke test issue

* fix according to Vladislav's second round review

* fix format

* Add StridedSlice & Einsum

* fix pad_test.cpp build issue

* fix according to review comment

* insert directly into output shape

* revert infer_slice_shape() change since vpux compiler uses this function

* move tests

Co-authored-by: Stepyreva, Evgenya <evgenya.stepyreva@intel.com>
2021-12-22 06:54:12 +03:00
Tomasz Jankowski
dcfaf424a0 [ONNX FE] Add support for partial shapes with boundaries (#9321) 2021-12-21 16:38:15 +01:00
Ilya Churaev
b5238e55e1 Removed inference_engine, ngraph, transformations libraries (#9309) 2021-12-21 05:27:53 +03:00
Tomasz Dołbniak
29eb83d904 MO: adding extra tensor names during the graph modification (#9292) 2021-12-20 23:23:03 +03:00
Ivan Novoselov
fa9434494f [Snippets][CPU] Eltwise subgraphs code generation (#7936) 2021-12-20 22:45:01 +03:00
Tomasz Dołbniak
46c9755b6e ONNX FE tests: fix after a conflicting merge of 2 PRs (#9320)
* Fix after a conflicting merge of 2 PRs

* Even more alignment
2021-12-20 20:46:15 +03:00
Piotr Szmelczynski
513867e168 [PYTHON] Rename arg names python api (#9209) 2021-12-20 14:31:48 +01:00
Tomasz Dołbniak
d82b58a408 Handling of cut + reshape in MO using ONNX FE (#9102) 2021-12-18 13:29:40 +01:00
Ilya Churaev
be86ec51ab Renamed frontends from *ov_frontend to ov_*_frontend (#9275)
* Renamed frontends from *ov_frontend to ov_*_frontend

* Fixed MO

* Fixed include
2021-12-18 13:25:42 +03:00
Mikhail Nosov
c7a3c93d3f FrontEnd API - change 'shared_ptr' to 'const shared_ptr&' (#9287)
* FrontEnd API - change 'shared_ptr' to 'const shared_ptr&' in public arguments

* Fix clang-format
2021-12-17 22:39:13 +03:00
Piotr Szmelczynski
9e8c8dbd94 [PYTHON] Improve Tensor-to-numpy converts (#9138)
* add support for f16 and bf16 for outputs_to_dict

* create test for f16

* add test for infer new request return type

* fix infer return type test

* update Type import

* update asserts in infer_new_request_return_type

* fix import in test_infer_request

* clean test file

* style fix
2021-12-17 14:37:59 +03:00
Maxim Andronov
04dc16f861 [CPU] General fixes for dynamic shapes. Part 2 (#8871) 2021-12-17 11:12:07 +03:00
Ivan Tikhonov
dbd2b5dc08 ONNX/IR/Common FrontEnds Refactoring (#9174)
* Refactor ONNX,IR,Common FrontEnds

* Rename frontends dir to frontend

* Rename frontend_manager, frontend_defs -> manager, defs; move Place, InputModel to src for Paddle FE

* remove exports for ir/input_model

* fix unit tests

* Fix unit tests

* revert ONNX_API/IR_API defines

* move manager.hpp to frontend dir

* delete common folder; rename defs to visibility; fix includes

* revert local changes

* codestyle

* fix build: set correct includes

* fix includes

* fix build; resolve review comments

* fix install paths

* correct installation folder for onnx_import

* use IE_THROW in ir frontend
2021-12-17 08:05:30 +03:00
Vladislav Volkov
6ddc47a7ef [CPU] Convert precisions on inputs/outputs (#8805) 2021-12-16 16:58:19 +03:00
Ilya Churaev
9b71a5fb70 Fixed python tests (#9238) 2021-12-16 07:52:59 +03:00
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