Commit Graph

91 Commits

Author SHA1 Message Date
Yury Gaydaychuk 7ab92b5845
[CPU] Adaptive pooling implementation (#6594) 2021-07-29 20:41:24 +03:00
Mateusz Tabaka 22273f8069
[ONNX] Add ONNX specific FrontEnd classes (#6615)
This change implements a subset of FrontEnd API for ONNX:

Changes:
- move onnx_common, onnx_editor and onnx_import to ngraph/frontend/onnx
- introduce new target 'onnx_frontend_ngraph' located in ngraph/frontend/onnx/frontend
- new target implements subset of FrontEnd, InputModel and Place interfaces
2021-07-22 16:26:05 +02:00
Maxim Vafin 960ba48e6f
Rework model loading in FE manager, implement PDPD probing (#6358)
* Rework model loading in FE manager, implement PDPD probing

* Fix build

* Fix build

* Fix build

* Fix unicode

* Fix merge issues

* Fix codestyle

* Read frontends path from frontend_manager library location

* Fix codestyle

* Fix FE dependency

* Fix dependencies

* Fix codestyle

* Check if model file exists

* Revert adding model to lfs

* Add test model

* Fix cmake dependencies

* Apply review feedback

* Revert pugixml

* make getFrontendLibraryPath not public API

* Fix codestyle

* Apply fix from Ilya Lavrenov

* Add FE dependency in legacy tests

* Remove not needed dependency

* Better support Unicode

* Fix build

* Fix build

* Fix build

* Add dependency foe deprecated tests

* Fix dependency

* Fix typo

* Revert adding FE dependency to IESharedTests

* Remove relative paths from frontend unit tests

* Apply review feedback

* Fix typo

* Return allow-undefined, since kmb dependecies fail to link

* Fix merge conflict

* Compare functions in reader tests

* Simplify code to load from variants

* Remove supported_by_arguments from public api

* Fix codestyle

* Fix build

* Compare names in reader tests

* Fix wchar in variant

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2021-07-19 20:10:00 +03:00
Maxim Vafin e25bb7e6ab
Add AdaptivePool to ngraph python API (#6579)
* Add AdaptivePool to ngraph python API

* Disable tests until CPU implementation is ready

* Change ticket number

* Add create op tests

* Fix quotes

* Fix typo
2021-07-15 18:03:51 +03:00
Luo Cheng 2378593bd5
MulticlassNms/MatrixNms: ngraph python api (#6573)
* nms python api

* fix python code style

* fix python code style

* apply review comments

* apply review comments
2021-07-14 07:06:39 +03:00
Jan Iwaszkiewicz 01eebba54b
[nGraph] Return Node's operation version (#6589)
* Add python test

* expose node version to python api
2021-07-13 12:49:11 +03:00
Ivan Tikhonov de8c57e034
DeformableConvolution v8: ngraph python API (#6520)
* Python API for DeformableConvolution op

* python codestyle

* fix python codestyle

* resolve review remarks

* fix python codestyle
2021-07-09 09:41:43 +03:00
Mikhail Nosov 9868bde421
[Frontend] pickle.dumps support for FrontEndManager (#6370)
* [Frontend] pickle.dumps support for FrontEndManager

* Fix clang-format

* Reorganize imports in test_frontendmanager.py
2021-06-25 15:51:33 +03:00
Mikhail Nosov 6926d5d639
[nGraph FE] Python bindings for nGraph FrontEndManager API (#5995)
* [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
2021-06-22 08:24:47 +03:00
Tomasz Jankowski b1db3448e7
[ONNX] Extend ONNX Importer for operation "Einsum" (#6074) 2021-06-16 14:57:29 +02:00
Tomasz Dołbniak 14e486b767
MVN test with opset6 version of the op (#6111) 2021-06-10 23:34:36 +03:00
Ivan Tikhonov aa0c93300c
Update for Python API to create networks with Memory layers (#6079)
* Update python API for Memory

* Run unit tests on CPU only

* add missed import

* Update tests

* fix py tests
2021-06-09 12:19:36 +03:00
Mikhail Treskin 56ada41bd0
Add get_constant_from_source capability to pyngraph (#6018) 2021-06-07 18:19:52 +03:00
Mikhail Nosov e5622738e7
Exposing 'Dimension' class to Python nGraph API (#5997) 2021-06-03 08:46:34 +03:00
Tomasz Dołbniak 3bb91c4e5a
Fix of some nGraph python tests (#5778) 2021-06-02 12:57:57 +02:00
Tomasz Dołbniak ef5ded7878
Obsolete tests removed (#5786) 2021-05-28 07:48:38 +03:00
Katarzyna Mitrus 82b84c0b61
Fix ng python ShuffleChannels group attribute (#5678) 2021-05-20 12:31:19 +02:00
Aleksandr Pertovsky d2fb57dfe0
[CPU] Add DFT/IDFT ops (#5383) 2021-05-17 08:45:34 +03:00
Ilya Lavrenov 07a49184c0
Fixed typo in length (#5611) 2021-05-13 07:52:55 +03:00
Pavel Esir b17b526009
Add gather 7 to nG Python API and IE IR reader test (#5276)
* nG Python api for Gather and IE IR reader tests

* also included old IE IR reader test for Gather1

* added a blank line before Gather

* style corrections

* applied review comments

* removed blank line

* removed xfailed for Gather7 with batch_dims since CPU was moved to nGraph (...allows to fallback node execution on ngraph evaluate() method in case if optimized implementation is absent)

* added new visitor tests
2021-05-12 12:11:27 +03:00
Gabriele Galiero Casay a78515f3e7
Revise DeformableConvolution operation class (#5244)
* Enhance dynamic shape inference of validate and infer types method

* Review op class of DeformableConvolution

   * Add node validation checks into validate and infer types specific to element type and shape of inputs
   * Refactor validate and infer types method to use common function to validate conv parameters and infer output shape
   * Apply these changes to Convolution and BinaryConvolution for alignment

* Add type_prop unit tests

* Add node validation checks for deformable values spatial dimensions

* Fix type_prop and python api shapes

* Fix deformable values spatial dimensions

* Add validation checks in reference implementation

* Address review comments

 * Remove reference to const for basic types in ref impl
 * Update comment with ticket to add check for u1
 * Change deformable values to offset to align with spec
2021-05-12 09:21:33 +03:00
Vladimir Gavrilov 62b1f655c0
DFT and IDFT nGraph Python API (#5387)
* Added nGraph Python API for operations DFT and IDFT.

* Written tests for the DFT Python API.

* Written tests for IDFT nGraph Python API.

* Small fixes.

* Started to add tests for the signal_size case.

* Written tests for signal_size case of DFT.

* Written tests for signal_size case of IDFT.

* Some code style fixes in IDFT nGraph Python API tests.

* Code style fixes in tests for DFT nGraph Python API.

* Now DFT nGraph Python API tests are used numpy FFT ressults as expected results of tests.

* Now IDFT nGraph Python API tests without signal_size are used numpy FFT result as input data.

* Now IDFT nGraph Python API tests use numpy IFFT as expected results for signal_size cases.

* Deleted redundant function.

* Formatting fix.

* Now test data for DFT and IDFT nGraph Python API are randomly generated.

* Added seed initialization.
2021-05-05 17:17:46 +03:00
Roman Kazantsev d716db4acc
Extend Python nGraph API with Einsum-7 and test nGraph reader (#5486)
* Extend nGraph Python API and test IE IR reader for Einsum

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

* Format description for test auxiliary function

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

* Remove print from the python test

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-05-04 14:04:21 +03:00
Aleksandr Pertovsky 5d8f209df6
[CPU] Add Roll support (#5112) 2021-05-03 15:01:05 +03:00
Egor Shulman 211c5773fc
[CPU] BatchToSpace, SpaceToBatch layers optimizations (#4029)
* BatchToSpace, SpaceToBatch layers optimizations

* Fix according to review

* Fix tests for oneDNN (v1.6)

* Fix of support BF16

* Fix in/out config

* Add support of Blocked layout

* Fix of support U8

* Add support for in/out channels of different sizes

* Removed xfail

* Removed xfail_issue_34327

* BatchToSpace, SpaceToBatch layers optimizations

* Fix according to review

* Fix according to review

* 3 different implementations -> 1 implementation

* Fix THROW

* Fix Exception

* Revert Batch_to_Space to parallel_for

* Fix remarks

* parallel_for -> parallel_nt

* Fix remarks

* Fix data separation

* Fix according to review
2021-04-19 10:15:59 +03:00
Anastasia Popova f681907fdd
Roll nGraph Python API (#5237)
* Added Roll to nGraph Python API.

* Added empty line at the end of file.

* Corrected a typo.

* Added Roll test.

* Reformat code.

* Removed empty line.
2021-04-15 07:19:15 +03:00
Alexandra Sidorova 325b5564f3
[CPU] Added GELU-7 support (#4800) 2021-04-07 16:01:47 +03:00
Alexey Suhov 6478f1742a
Align copyright notice in python scripts (CVS-51320) (#4974)
* Align copyright notice in python scripts (CVS-51320)
2021-03-26 17:54:28 +03:00
Jan Iwaszkiewicz 8ec59ceda4
[CPU][ONNX] Convert FP64 precision to FP32 (#4681) 2021-03-19 19:28:55 +01:00
Ivan Tikhonov b792214d04
Fix python API for Loop/TensorIterator/Assign/ReadValue operations (#3275)
* update python API for the Loop operation (attempt 1)

* fix code style

* update visitor API, pep8

* codestyle

* delete TensorItertorBuilder

* update visitor API for Loop and TensorIterator

* fix code issues (python)

* update python api:assign/read value

* fix unit tests

* fix python code style

* fix loop unit test

* fix loop unit test

* fix build on centOS
2021-03-11 13:22:24 +03:00
Gabriele Galiero Casay bd949c6baf
BinaryConvolution Reference Implementation (#4278)
* Add BinaryConvolution unit tests.

* Changed types to u1.

* Add BIN precision handling in TestCase class.

* Refactored validate and infer types to enhance dynamic shape inference

* Add type_prop test to cover invalid op cases and dynamic shapes

* Fix style

* Disable check for float type of data batch input

* Add type_prop test for incompatible input channels in inputs

* Disable backend unit tests

* Fix style

* Add reference implementation

* Add backend tests

* Add single layer tests

* Add check for float element type of batch data input

* Refactor backend test cases to compare with regular convolution

* Add serialization tests

* Clean up

* Add 1D and 3D tests into op_eval

* Changes in reference implementation to improve readability

* Add ticket information for todo tasks

* Fix implementation misbehavior for filter channels

* Add backend unit tests to cover strides, dilations, padding, channels and batches

* Add end of line into files

* Change name of type_prop unit tests

* Simplified lambda to get spatial dimensions of filters

* Add comment to support filters input as Parameter

* Add namespace details for BinaryConvolution utility functions

* Address review comments

Co-authored-by: jdanieck <jozef.daniecki@intel.com>
2021-03-09 22:58:25 +03:00
Evgeny Lazarev 99f94ca09c
Adding v7::Gelu operation (#4497)
* Added support for Gelu-6 to the MO

* Adding Gelu-6 to ngraph and python API + some tests

* Fixed typo in the Gelu approximation mode

* Fixed Gelu-6 reference implementation for Tanh mode

* Added transformation to downgrade v6::Gelu to v2::Gelu

* Added specification for the Gelu-6

* Code style fixes

* The Gelu-6 operation specification update

* Fixed compilation issue in reference implementation for Gelu

* Fix compilation issues for some OSs

* Code style fix

* One more cpplint issue fix

* Fixed Gelu6 reference implementation compilation on Windows.

* Code style fix

* Fixed various ngraph unit tests

* Code style check

* Reverted Gelu-2 to be fused op

* Fixed Gelu6 downgrade transformation

* Added unit test for Gelu6Downgrade transformation

* Update copyright year

* Updated copyright year

* Replaced tab characters with 4 spaces in IR reader tests

* Code style fixes

* Added default value for GeluApproximation mode for Gelu-6 op

* Fixed code style for Gelu-6

* Changed order of parameters for the Gelu evaluate to potentially avoid backward compatibility issues with ARM plugin

* Fixed code style

* Introduced opset7. Moved Gelu6 to opset7

* Fixed non-updated transformation

* Fixed opset version in ngraph Python API for Gelu operation

* Fixed typo in the opset number in the documentation

* Reverted some changes related to Gelu6

* Updated MO to produce Gelu7

* Updated unit tests for Gelu

* Updated Gelu7 specification

* Changed gelu reference implementation. Added opset7 to Python packages

* Updated Python API tests for Gelu operation

* Code style fix

* Marked get_approximation_mode function as const

* Added missing "const" qualifier

* Fixed code style issues in tests

* Added extractor for MxNet operation Gelu

* Spelling issues fix

* Updated MxNet supported symbols

* Added NGRAPH_OP_SCOPE for Gelu7 validate_and_infer_types

* Fixed a typo in the comment
2021-03-09 22:45:45 +03:00
Maxim Andronov f26c82bde3
[CPU] Supporting constant networks (#4379) 2021-02-19 09:38:20 +03:00
Mateusz Bencer d821ec47ce
[ONNX] Handle optional outputs for Dropout and MaxPool (#4143) 2021-02-15 11:14:20 +01:00
Maxim Vafin e80e5e7ae5
Add python API for MVN-6 (#3816)
* Add python api for MVN-6

* Fix code style

* Fix codestyle

* Apply feedback

* Fix test
2021-02-04 17:36:19 +03:00
iliya mironov 1419e05032
Add python api for CTCGreedyDecoder (#3947)
* Add python api for CTCGreedyDecoder

* Fix code style

* Fix unit test

* Fix code style

* Fix unit tests

* Fix python tests

* Fix python tests

* Fix python tests

* Fix according to code review

* fix

* Fix api

* fix unit tests

* Fix unit test

* Fix python api
2021-02-03 14:53:53 +03:00
Jan Iwaszkiewicz 647104f602
[nGraph][ONNX] WA for currently unsupported precisions (#3964) 2021-01-25 13:08:15 +01:00
Tomasz Dołbniak 303c549791
nGraph copyright update for 2021 (#3832) 2021-01-13 16:43:04 +03:00
Pavel Esir d9bd59c7a0
Evaluate, ngraph_reader check and Python nGraph API for GatherElements (#3624)
* add GatherElements evaluate to interpreter backend

* Finally successfully run on backend

* debugged non-typical cases

* added ngraph_reader tests for GatherElements

* added Python API for GatherElements

* apply_style

* corrected python api tests

* applied comments

* style-apply

* finally corrected nGraph Python API for GatherElements

* minor corrections

* style-apply

* replaced quotes

* added blank line

* corrected evaluate and disabled unit-tests for not yet supported plugins

* style-apply

* applied comments: negative tests added and additional checks in evaluate

* added bound check for axis in evaluate

* style-apply

* apply review comments

* fast correct evaluate for GatherElements

* style-apply

* revert changes in interpreter unit_test.manifest for Gather

* 🚀 optimized general solution; added separate calculation for 2D

* 🚀 applied comments

* style-apply
2021-01-11 19:52:47 +03:00
Mateusz Tabaka 47485646bb
Revise DetectionOutput reference implementation (#3448)
* Revice DetectionOutput reference implementation

Ticket: 37433

* fix test_create_op

* fix test_dyn_attributes

* apply code format

* fix crash on Windows when variance_encoded_in_target == 1

* add more checks for DetectionOutput inputs

* Fix single layer tests

* apply code format

* fix ssd_vgg16_300 inference with batch size > 1

* update types in docs

* fix crash on windows

* apply code style

* fix python tests

* fix setting output type

* change False to false and True to true in docs

* Allow prior boxes to have different type than box logits

Some models work that way

* simplify output shape calculation

* fixes to docs
2020-12-16 11:02:12 +03:00
Tomasz Socha dbf855b320
[ONNX][Python][Tests] Update ONNX to onnx 1.8 (#3557) 2020-12-11 11:57:50 +01:00
Mateusz Tabaka 305f005605
Add reference implementation for PSROIPooling operator (#3245)
* Add reference implementation for PSROIPooling operator

* fix test_roi_pooling

* use std::roundf

* remove unnecessary copies in single layer tets

* Fixes after review

* fixes after review

* use element::Type_t instead of element::

* apply code format

* add PSROIPooling to evaluates_map

* apply code format
2020-12-08 06:35:52 +03:00
Bartosz Lesniewski 2da6546841
Remove ops from Layer Creator/ Node Converter - part 2 (#3226)
* remove power op from layer creator

* remove prelu op from layer creator

* remove tile op from layer creator

* remove relu op from layer creator

* remove selu op from layer creator

* remove softmax op from layer creator

* remove tanh op from layer creator

* remove split op from layer creator

* remove reshape op from layer creator

* remove reverse sequence op from layer creator

* remove proposal op from layer creator

* remove priorbox op from layer creator

* remove roipooling op from layer creator

* remove priorboxclustered op from layer creator

* style fix

* utility function to parse bool-containing strings

* align priorbox scale_all_sizes parameter to specification

* change location of getBoolStrParamAsIntStr function

* align prelu creator to new constant op changes

* adjust priorbox tests to align with scale_all_sizes default value

* adjust priorbox python tests to align with scale_all_sizes default value

* align priorboxclustered attributes initlialization to specification

* fix checking wrong container's end iterator for opset name search

* improve comment on roipooling parameters

* Apply review suggestion 1

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

* Apply review suggestion 2

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

* align priorbox step initial value to specification

* align roipooling method attribute to specification

* remove roipooling specific creator

* align with review comments

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
2020-12-04 19:49:36 +03:00
Jan Iwaszkiewicz e1a7f7e5af
[nGraph][IE] Enable FP64 data type in IE and review nGraph Python tests (#2563) 2020-12-02 12:09:28 +01:00
Michał Karzyński 95cae09566
Add support for multiple outputs in nGraph Python API (#3421) 2020-12-02 11:49:10 +01:00
Gleb Kazantaev 27efd1fc7e
Resolve dynamism in Serialize transformation (#3260)
* Added Interval shape inference for NMS5

* Added dynamic shape resolver for Serialize pass

* Refactored Serializatoin tests; Added tests with dynamic shapes(NMS5, ShapeOf)

* Fixed python NMS5 test

* Fixed LowLatecnyTests
2020-11-24 12:38:56 +03:00
Ivan Tikhonov ea52dd2642
TI and Sequences related transformations: transition from cnn to ngraph versions (#2927)
* sequences to ti transformations, support for seq_lengths input, update reference implemetations, add new tests

* fix python api, update sequences to ti transformation

* transition from cnn to ngraph transformations for cpu, gpu, vpu plugins

* fix convert_ti_to_sequence transformation

* fix naming issue in unroll transformation

* test pure TensorIterator in vpu plugin

* fix sequences to ti transformation

* Update sequences to TI transformation: fix reverse sequence support

* update single layer tests, fix TI reference impl, fix Sequences to TI transformations

* ngraph code style

* fix build

* fix ngraph python api

* resolver review comments, refactoring

* revert vpu changes

* disable/fix tests

* refactoring

* Resolve review remarks

* optimization of LSTMSeq -> LSTMSeq IE: remove unnecessary Transpose ops

* Refactoring of transformation pipeline in cpu and gpu plugins, align GRU/RNN -> GRU/RNN IE with LSTM -> LSTM IE

* update TensorIterator tests, refactoring

* fix typo

* Fix unit tests, delete unnecessary callbacks

* Refactoring: delete commented code

* Add FullyConnected to skipConstInfer list for legacy ConstFolding

* disable legacy cnn unit tests

* delete xfail

* fix for backward compatibility with opset1::LSTMCell

* delete xfail

* fix build, remove Reshape layer from skipConstInfer list
2020-11-17 12:38:22 +03:00
Jan Iwaszkiewicz cfe143fd33
[nGraph][ONNX] Rename xfails (#3061) 2020-11-17 10:34:33 +01:00
Ivan Tikhonov b45e1a25a5
LSTM/GRU/RNN Sequences : support for seq_lengths input (#2788)
* sequences to ti transformations, support for seq_lengths input, update reference implemetations, add new tests

* fix python api, update sequences to ti transformation

* fix sequences to ti transformation

* Update sequences to TI transformation: fix reverse sequence support

* update single layer tests, fix TI reference impl, fix Sequences to TI transformations

* ngraph code style

* fix build

* fix ngraph python api

* resolver review comments, refactoring

* Resolve review remarks

* delete xfail
2020-11-17 07:04:20 +03:00
Ivan Tikhonov c309bb77d2
Reference implementations for Loop and TensorIterator ops (#2978)
* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter

* refactoring SubGraphOp class

* type prop unit tests

* ngraph code style

* update comment

* single layer tests for Loop operation

* fix file name

* Add SpecialBodyPorts attribute in Loop op, update single layer tests

* first debug version

* more tests

* missing test file

* removed not needed shapes from test data

* move test data to new folder

* shape infer tests

* Added execution tests

* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests

* ngraph codestyle, refactoring, clone_new_args test

* resolve review remarks

* fix build

* fix tests

* more execution tests

* add a new constructor of Loop op, resolve review remarks

* execution tests

* synchro with current version

* handle scalars and more tests

* scalar test enabled

* loop reference impl

* bug fixes in tests, onnx importer part and in the ref implementation of the Loop op

* applied remarks

* handle unsupported cases

* rewrite unit tests

* update INTERPRETER manifest

* is_termination_condition_always_true simplification

* [TEST] update python models tests

* review remarks

* added xfail to tiny_yolov3

* missing model test

* revert test data

* fixed numbers of failing tests

* fixed failed test description

* fix test message

* fix xfail test

* reference implementation for ngraph::function

* update loop reference implementation

* Refactor loop reference implementation

* ngraph codestyle

* Refactoring

* Submodule update

* Skip check for Reduce ops in mkl for scalar cases, support for yolov3

* fix ngraph reader tests

* revert ceiling op, renaming

* Add allias(Ceiling) for Ceil op in mkl

* delete xfails

* fix build

* single layer tests for tensor iterarator

* Refactor TensorIterator and Loop ref impls

* revert dynamic tensor creation, disable some dynamic test cases

* fix warning

* Resolve review remarks

* revert Predefined values in Loop tests

Co-authored-by: Mateusz Bencer <mateusz.bencer@intel.com>
2020-11-10 15:49:59 +03:00