Commit Graph

180 Commits

Author SHA1 Message Date
Mikhail Nosov
9f9df184c4 Added compatibility check of layout with partial shape (#10144)
* Added compatibility check of layout with partial shape

E.g. layout "NC" in not compatible with PartialShape{1,3,224,224}

Check is added:
- For parameter set_layout
- For parameter set_partial_shape
- For result set_layout
- Checked also compatibility for all results after 'validate_and_infer_types'

* Fix incorrect tests

* Fix of more incorrect tests

* Removed couple of obsoleted error-handling tests - these are catched now on earlier stages

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-02-07 11:17:28 +03:00
Alexander Zhogov
18fd46a447 Revert "FrontEnd OpExtension (#9917)" (#10146)
This reverts commit 768f353300.
2022-02-05 10:42:17 +03:00
Ivan Tikhonov
768f353300 FrontEnd OpExtension (#9917)
* Squash commits: OpExtension, pybindings, unit tests

* fix incorrect merge

* fix builds

* fix macro on Windows

* Update OPENVINO_FRAMEWORK_MAP to support any cnt of attributes, fix pybinding, resolve review comments, add unit tests

* Fix PEP8, fix unit tests build

* Remove exports from template classes

* fix MacOS build, fix copyrights, clean up

* investigate issue with reshape py tests: temporary delete OpExtension python tests

* Revert "investigate issue with reshape py tests: temporary delete OpExtension python tests"

This reverts commit 2ea2bc9e2e.

* fix model name for onnx tests

* fix python unit tests

* add new lines in the end of files

* fix unicode support on Win OS

* fix codestyle

* Update ends_with function implementation

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* update copyrights

* resolve review comments

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
2022-02-04 22:28:13 +03:00
Alexey Lebedev
7478915ef3 [PYTHON API] Fix InferQueue.is_ready() call (#10096)
* Fix is_ready and add tests

* remove wrong comment

* refactor test

* Fix code style
2022-02-04 11:57:56 +03:00
Ilya Lavrenov
f2f281e60b Renamed ov_runtime => openvino, ov_ => openvino_ prefix (#10069)
* Renamed ov_runtime => openvino, ov_ => openvino_ prefix

* Coverage fix

* More fixes

* Fixed MO tests with custom FE
2022-02-03 20:03:41 +03:00
Nikolay Shchegolev
b34cb55081 [CPU] Gather JIT implementation + Gather8 support. (#10083) 2022-02-03 12:32:23 +03:00
Alina Kladieva
552454a3f0 Revert "[CPU] Gather jit implementation. (#6601)" (#10077)
This reverts commit fbe8aa94a4.
2022-02-02 20:12:24 +03:00
Nikolay Shchegolev
fbe8aa94a4 [CPU] Gather jit implementation. (#6601) 2022-02-02 15:02:49 +03:00
Anastasia Kuporosova
70f65bdb74 [Python API] Rename configuration API + update tests/tools (#9927)
* [Python API] Rename configuration API + update tests/tools

* keep old api for compatibility

* add deprecation warnings

* apply comments to query sample

* remove convert to pyobject

* use Any instead of string

* update tests

* update set_property

* fix sample

* update test + try-except for pot

* add docstrings

* fix codestyle for pot
2022-02-02 11:28:41 +03:00
Alexey Lebedev
495931673d [PYTHON API] fix request busy using AsyncInferQueue (#10020)
* Add request.wait() call to get_idle_request_id and wait_all()

* rethrow exception on default callback

* update comment

* fix code style
2022-01-31 15:30:04 +03:00
Jan Iwaszkiewicz
1e58c55678 [PYTHON] Allow ports as inputs for infer methods (#9839)
* Use of ports for input values

* Refactor tests

* Fix inputs overwritting

* Fixed for review comments

* Remove unused branch and refactor ie_api.py
2022-01-25 13:19:12 +03:00
Jan Iwaszkiewicz
967fc0a756 Added callable CompiledModel (#9812) 2022-01-21 13:27:51 +03:00
Ivan Tikhonov
29d73ce3c8 FrontEnd ConversionExtensions (#9070)
* Squash commit: implement Conversion extensions

* Refactor PaddlePaddle FrontEnd

* Codestyle

* FrontEnd,InputModel,Place base classes -> abstract, renamed model file

* Fix unit tests

* fix unit tests

* ngraph:: to ov::

* Rename frontends dir to frontend

* fix merge conflicts

* Fix ConversionExtension

* get rid of NamedInputs/Outputs in TF FE

* Rename paddlepaddle to paddle; pdpd to paddle

* add missing file

* codestyle

* Remove local change

* paddlepaddle -> paddle for azure configs and .md files

* fix package name, fix config files

* Fix win build

* Revert Broadcast/AutoBroadcast changes

* codestyle

* fix FronEnd class

* fix ngraph_cpp_api.config

* fix incorrect merge, codestyle

* fix conversion extension

* conversion extension

* codestyle

* merge master

* fix build

* refactoring; revert broadcast/autobroadcast changes

* codestyle

* fix MacOS config

* resolve merge conflicts

* refactor includes

* register ConversionExtension in FrontEnds

* move get_op_type to base NodeContex class

* set op_translator map in ctor of Paddle FE; fix unit tests

* update unit tests; codestyle

* codestyle

* preliminary version of conversion extension in pybind

* conversion extension

* get_attribute_as_any method for NodeContext

* move get_attribute methods to NodeContext base class, rename get_ng_input to get_input

* add missed file

* Implement ov::Any getter in ONNX NodeContext

* fix py bindings

* Add update ConversionExtension unit tests, add SO unit tests, fix TF FE

* fix segfault on destructor

* fix NodeContext interface, fix unit tests

* set different names for ConversionExtensions in unit tests

* fix PaddleFuzzy tests

* fix Paddle Fuzzy tests

* revert changes in generate_slice.py

* fix codestyle

* fix pybindings

* revert local changes in generate_slice.py

* delete duplicate exceptions.hpp

* Refactoring: fix names according to convention

* pybinding for NodeContext, FrontEnd, ConversionExtension; fix unit tests; implement new unit tests

* Refactoring

* fix the case when a new converter rewrites existed one; delete unnecessary NodeContext from pybindings; use CreatorFunctons from the base class in ConversionExtension; update unit tests

* Revert local change

* PythonAPI: fix get_attribute method; fix get_input method; implement support of dtype and default attributes

* Fix py unit tests: add support for vector<ov::element::Type> as attribute

* resolve review comments

* fix unit tests

* move extension_holder to openvino/frontend/extension folder

* fix build on mac os

* temporary disable cast from vector<bool> to investigate issue on mac os

* Resolve review comments

* Resolve review comments

* Use dev API for .so extension

* Link frontends to pyopenvino as separate targets

* Temporary enable tf fe installation

* ignore PEP8 E402 for init files, set correct directory for py modules

* revert local changes

* Fix deadlock in pybind GIL; fix Win build; fix PEP8

* fix PEP8

* Add a return type annotation

* fix builds; fix ON/OFF switcher for ENABLE_OV_xxx_FRONTEND cmake options

* Fix the issue with ifdefs on WinOS; fix the issue related to pybindings and static c++ object

* fix python unit tests

* fix static build on WinOS

* Retrigger CI builds

* Fix static build on Windows

* fix static build on Windows again

* Retrigger CI

* delete unused includes; add a comment about issue on MacOS

* fix missprint

* resolve review comments

* fix missprint

* resolve review remarks

* Resolve review comments

* win win wheels build

* resolve review comments
2022-01-20 20:44:31 +03:00
Mikhail Nosov
7126bef2be [Python Bindings] Frontend test for telemetry extension (#9768)
* Python bindings - test for telemetry extension

This also ensures that actual 'Telemetry' object containing callbacks is still alive even there is no explicit Python objects holding it

* Fix pylint

* fix clang-format
2022-01-20 16:44:54 +03:00
Mikhail Nosov
9f2cb8e102 [PyBind] Fix crash on destroying dtype_to_ov_type static map (#9772)
* Use std::string for static map instead of py::str

Probable reason is that this static map is destroyed after 'pybind' module is destoryed itself, thus py::str can't be cleaned up properly

* Added test via 'subprocess' execution of separate file
2022-01-19 21:01:18 +03:00
River Li
d792545365 [PYTHON] Add python APIs for loadNetwork and compile_network without device name (#9536)
* [PYTHON] Add python APIs for loadNetwork and compile_networt without device name

   CVS: https://jira.devtools.intel.com/browse/CVS-75249

Change-Id: Ia28e35f4ee66fc8fc5997b5bafe1b159670f9a21
Signed-off-by: River,Li <river.li@intel.com>

* Fix clang issue

Change-Id: I9988b16863af0e3883e99369f124cd05761d3210

* Fixed positional arguments issue

Change-Id: I6c3aa98bb693a619fa54fd6e96cf5eb89cdb9369

* Fixed 2 blank lines issue

Change-Id: I7f2afd7ebb80867a69d0c3ac9a6d4a38d95edb12

* Set AUTO as default device if no device name is set

Change-Id: Ic8646b12af0a2ab2fec6a07f5a12d460dcf781d7

* Resolve comments from code reviewer

Change-Id: Ia47faeb48937096e41e22ac59fbd88ec82cc6733
2022-01-19 16:09:15 +03:00
Alexey Suhov
a79830cb55 Update year to 2022 in copyright notice (#9755) 2022-01-19 01:07:49 +03:00
Alexey Lebedev
9a59e871eb [PYTHON API] fix hash operator for ports (#9673)
* Fix get_node call

* Add operators and define hash

* rename infer request property

* add new line

* remove unused var

* Move tensor getters to InferRequestWrapper

* check node hash

* add new line

* fix samples

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2022-01-18 21:09:03 +03:00
Anastasia Kuporosova
8f12b72f46 [Python API] Rename offline_transformations in the new api (#9634)
* [Python API] Rename offline_transformations in the new api

* remove comments

* one more place to rename

* fix mo building

* fix after merge

* fix for pot import
2022-01-17 11:57:00 +03:00
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