Commit Graph

2222 Commits

Author SHA1 Message Date
Mateusz Tabaka
69af75e483
Allow FakeQuantize with output_low scalar to be transformed (#3812)
* Allow FakeQuantize with output_low scalar to be transformed

* add test case with scalar
2021-01-15 16:16:53 +03:00
Maksim Makridin
9211dc07bc
Enhancing Object Detection Sample SSD C Sample docs to cover the use of ie_network_reshape() for setting the batch size (#3875) 2021-01-15 15:20:47 +03:00
Nikolay Tyukaev
ab94f60cb9
doc files copyright (#3843)
* doc files copyright

* fix indentation
2021-01-15 15:15:17 +03:00
Ilya Lavrenov
a0df6152a8
Added -Wall for IE Core libraries (#3852) 2021-01-15 12:51:01 +03:00
Anastasia Kuporosova
320aafbb59
[Python API] Small fixes in tests and change of format string to f-string (#3865) 2021-01-15 12:48:58 +03:00
Nikita Kudriavtsev
5d63b5f41f
[IE][VPU]: Fixed the calculation of timeout for x32 system (#3842) 2021-01-15 12:17:28 +03:00
Nikita Kudriavtsev
e9a52d39ac
[IE][VPU]: Added MYRIAD_THROUGHPUT_STREAMS in default config (#3861) 2021-01-15 12:08:59 +03:00
Tomasz Socha
cf358a9d0d
[ONNX Importer] Reduce amount of ONNX Importer public includes. (#3837)
* Initial moving

* ONNX Importer is private now - CMakeLists.txt

* ONNX Importer is private now - Includes

* Make some files visible

* Style apply

* Review fix

* Public headers have a prefix now

* Style

* hide more headers
2021-01-15 09:48:15 +03:00
Andrey Somsikov
cc9c480554
Fix sanitizer build (#3869) 2021-01-15 09:42:31 +03:00
Bartosz Lesniewski
2e09cd653a
Attributes have different values in MO and NGraph IRs (#3793)
* regionyolo do_softmax attribute

* add serialization single layer tests for normalizel2 and reshape

* add prelu sslt, change letter size in op name to align with MO

* add shufflechanels sslt, add workaround to serialize the op with proper opset number

* add broadcast sslt, change attribute string representations to lowercase

* add pad sslt, change attribute string representations to lowercase

* Unify sslt name prefixes

* add prelu name translation for serialization

* change expected type of regionyolo do_softmax attribute to bool

* transform autobcast type attr to lowercase, add unit test, add special opset mapping in serialization

* style fix

* fix indentation

* fix indentation 2

* Possibility of different opset assignment for different op versions

* Update header dates in  modified files

* Match special opset to type_info_t instead of a string

* Adjust the comment to match the code
2021-01-15 07:17:12 +03:00
Sergey Lyubimtsev
fa41a799b5
Inconsistent inference results for hello_classification sample between Windows and Linux (44369) (#3849)
* Fix image load issue

* remove extra line
2021-01-14 17:22:41 +03:00
Alexey Varyzgin
26d0d2c240
[BF16] Simulation mode was added to documentation (#3649)
* [BF16] Simulation mode was added to documentation

* Update Bfloat16Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
2021-01-14 16:58:59 +03:00
Evgeny Lazarev
dbad8809bf
MO dev guide refactoring (#3266) (#3595)
* Release mo dev guide refactoring (#3266)

* Updated MO extension guide

* Minor change and adding svg images

* Added additional information about operation extractors. Fixed links and markdown issues

* Added missing file with information about Caffe Python layers and image for MO transformations dependencies graph

* Added section with common graph transformations attributes and diagram with anchor transformations. Added list of available front phase transformations

* Added description of front-phase transformations except the scope-defined and points defined. Removed legacy document and examples for such transformations.

* Added sections about node name pattern defined front phase transformations. Copy-pasted the old one for the points defined front transformation

* Added description of the rest of front transformations and and all middle and back phase transformations

* Refactored Legacy_Mode_for_Caffe_Custom_Layers and updated the Customize_Model_Optimizer with information about extractors order

* Added TOC for the MO Dev guide document and updated SVG images with PNG ones

* Fixed broken link. Removed redundant image

* Fixed broken links

* Added information about attributes 'run_not_recursively', 'force_clean_up' and 'force_shape_inference' of the transformation

* Code review comments

* Added a section about `Port`s

* Extended Ports description with examples

* Added information about Connections

* Updated MO README.md and removed a lot of redundant and misleading information

* Updates to the Customize_Model_Optimizer.md

* More updates to the Customize_Model_Optimizer.md

* Final updates for the Customize_Model_Optimizer.md

* Fixed some broken links

* More fixed links

* Refactored Custom Layers Guide: removed legacy and incorrect text, added up-to-date.

* Draft implementation of the Custom layer guide example for the MO part

* Fixed broken links using #. Change layer->operation in extensibility documents

* Updated Custom operation guide with IE part

* Fixed broken links and minor updates to the Custom Operations Guide

* Updating links

* Layer->Operation

* Moved FFTOp implementation to the template extension

* Update the CMake for template_extension to build the FFT op conditionally

* Fixed template extension compilation

* Fixed CMake for template extension

* Fixed broken snippet

* Added mri_demo script and updated documentation

* One more compilation error fix

* Added missing header for a demo file

* Added reference to OpenCV

* Fixed unit test for the template extension

* Fixed typos in the template extension

* Fixed compilation of template extension for case when ONNX importer is disabled

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2021-01-14 16:28:53 +03:00
Vladimir Paramuzov
08afa4fd97
[IE CLDNN] Performance / accuracy fixes (#3729)
- Added linear_onnx mode support into resample_opt kernel.
- Fixed byxf layout check.
- Added Resample + Eltwise fusing support
- Update dequantize merge pass to work with eltwise instead of scale
- Fixed uninitialized m_maxBatch value for query mode
- Fixed missing AddPrimitiveToProfiler for DeformablePSRoiPooling
- Fixed 0d gather
- Added WA for Resample+Eltwise fusing

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-01-14 15:10:11 +03:00
Vladislav Volkov
93e9eefaec
Broken first inference time counter (#3848) 2021-01-14 15:03:34 +03:00
Krishna Prabhakaran
a9748062be
[IE][VPU]: Remove protocol checks for updating memType and watchdog flag (#3762)
Remove protocol checks for updating memType and watchdog flag. This has been verified by Microsoft on their target platform with 2 ma2085 over PCIE. The target was able to run openVino sample with these changes.
2021-01-14 14:50:01 +03:00
iliya mironov
5408f611e9
Add ctc gready decoder sec len op to ngraph (#3499)
* Add ctc gready decoder sec len op to ngraph

* Remove some comments

* Add second constructor

* Fix code style

* Fix code style

* Add unit tests

* Add tests to cmake

* Fix according to review

* Fix code style

* fix

* Change input layoyt

* Fix code style

* Add unit tests

* Add 3 input tensor check

* Update shell impl

* Fix code style

* Fix code style

* Add doxy gen

* Fix code style

* Update doxigen

* Update constructor description

* Fix code style

* Refactoring code

* fix code style

* Optimize op constructor

* Add macros. Optimize code for validate_and_infer_types

* Refactoring code

* Fix code style

* Fix code style

* Fix check blanck_index shape

* Fix code style

* Fix unit test for dynemic case

* Fix code style

* Fix copyryting

* reverse changes

* Update copyrite
2021-01-14 14:14:32 +03:00
Mateusz Tabaka
20b9d390e1
[ONNX] don't hardcode broadcast shape in Mul, Add, Sub, Div (opset <= 6) operators (#3679) 2021-01-14 11:24:37 +01:00
Alexander Zhogov
3c90a8e421
Azure CI: Add OpenCV env path on Windows (#3834)
* Set common Test ENV on Windows
2021-01-14 12:41:54 +03:00
Gorokhov Dmitriy
8c1d0b02ba
[CPU] Added vector size tiles alignment for quntization buffers (#3776) 2021-01-14 12:11:16 +03:00
Elizaveta Lobanova
84c06e0856
[GNA] Fixing issues for convolution single-layer tests (#3586) 2021-01-14 11:59:31 +03:00
Elizaveta Gerashchenko
d2303262a2
[IE CLDNN] Added ITT counters in the plugin (#3719) 2021-01-14 09:56:18 +03:00
Vladimir Paramuzov
036259481d
[IE CLDNN] Fixed factory registration in concurrent environment (#3833) 2021-01-14 09:36:14 +03:00
Piotr Szmelczynski
9ddbfac6b1
Avgpool revise (#3674)
* Update the spec

* add unit-tests

* add avgPool unit-tests to CMakelist

* Remove second constructor and change the first one to take default values for rounding_type and pad_type

* add type_prop test for default values

* add 5d input single layer test instances

* add type_prop tests

* Require input to be 4D or 5D

* add validation check for pads size

* Update few tests to take 5D input instead of 6D

* Update validate_and_infer_types method

* Update infer_batched_pooling_forward and try_apply_auto_padding methods

* Update auto_padding_spatial_dims_dynamic type_prop test for binary_conv, conv, deformable_conv, group_conv and max_pool

* style-apply

* add validation check for kernel size

* add xfail for avgpool python backend test

* style-apply

* remove avgpool backend test from xfail list

* Update spec

* Allow the 3D input

* Update type_prop test with 3D input

* style-apply

* Remove xfail_issue_38709

* fix typo

* Update spec

* Update outputs section in spec

* Update spec

* fix typo

* clean file

* Update detailed description and fix xml examples

* fix exclude-type typo

* fix typo in outputs section
2021-01-14 00:23:26 +03:00
Vladislav Volkov
b9447dfedf
V10Parser node factory improvements (#3824)
* Supported opsets check improvement

* Optimization of V10 nodes creation in nGraph

* Redundant type checking in opset removed

* opset2 existance check added
2021-01-13 19:45:51 +03:00
Vladislav Vinogradov
927ac47e2d
Add log_level option to compile_tool (#3831)
It will allow to turn on IE logging from CMD line
without extra configuration file.
Might be usefull for debugging.
2021-01-13 19:45:25 +03:00
Tomasz Dołbniak
bd299d3daf
ONNX model editor class with input types modification support (#3714) 2021-01-13 15:02:01 +01:00
Tomasz Dołbniak
303c549791
nGraph copyright update for 2021 (#3832) 2021-01-13 16:43:04 +03:00
Elizaveta Lobanova
36edd1fb38
[GNA] Fix handling of permutes around convolution for a case with 1 channel (#3481)
Fix of concat scale factors calculation causing infinite loop during memory layer requantization

Fix of copy layer unsupported batch size
2021-01-13 16:12:19 +03:00
Gladilov, Gleb
1601c7fdbd
[IE][VPU]: Enables Extract Dynamic Batch Transformation (#3715)
* [IE][nGraph]: Enables begin/end iterators for PartialShape

It's convenient to be able to use STL algorithms on
PartialShape since semantically PartialShape is a
sequence of Dimensions.

* [IE][VPU][nGraph]: Introduces tree utilities

Introduces Depth-First-Search and Breadth-First-Search
utilities for tree traversal. Templated arguments
makes them extensible for different use-case scenarios.

BFS is designed in way to make it possible to guarantee
node will be visited only after all its predecessors
have been visited:

       a
      / \
     b   c
     |   |
     d   |
     \  /
       e

There with accordingly provided functors (NumEntries) it's
guaranteed node "e" will be visited after "d" and "c".
Such a property is important for nodes depth evaluation.

* [IE][VPU][nGraph]: Fixes printTo for nGraph type

For some reason if printTo for nGraph type is
usual function it's not picked up by VPU_THROW_UNLESS
triggered inside DynamicToStaticShape transformations.

Making it template specialization does the job.

* [IE][VPU]: Introduces SliceConfiguration class

SliceConfiguration is a class that's intended
to express the result of operation slicing by
batch. The result of slicing is configuration
that specifies what to do with each data object
associated with operation. There are two options
defined: Slice and Unchanged. Typical slice
scenario is Slice, when operation has the same
batch for all inputs and outputs, so all
corresponding data object will be "sliced"
(replaced with copy where batch equal to 1).

At some cases, data object should not sliced
(ex. if operation has constant input which
is the same for all input data batches and
so, does not have batch - Add of 2 tensors
with shapes [10, 1000] and [1000]). To
represent such cases there is option
"Unchanged".

At cases when operation should not be sliced
at all (ex. does not have batch, have different
batch for inputs and outputs, has static
batch and so on) SliceConfiguration object will
return false for "hasSlice" method call. In
these cases inputs and outputs methods calls
will throw an exception.

* [IE][VPU][nGraph]: Enables MatMul operation slice

In case of static batch, operation is not going to be sliced,
since for handling such cases other transformation is used.
Such approach allows both passes to co-exist while one is
being replaced with another.

If data input has other dynamic dimension than batch error
will be thrown since Myriad-X plugin does not support
convolutions (HW accelerated operations) with dynamism in
spatial dimensions.

* [IE][VPU][nGraph]: Enables Convolution operations slice

In case of static batch, operation is not going to be sliced,
since for handling such cases other transformation is used.
Such approach allows both passes to co-exist while one is
being replaced with another.

If data input has other dynamic dimension than batch error
will be thrown since Myriad-X plugin does not support
convolutions (HW accelerated operations) with dynamism in
spatial dimensions.

* [IE][VPU][nGraph]: Enables unary eltwise slice

Since extract dynamic batch transformation will handle
dynamism only by batch (so requires body loop to be static)
operations with dynamism in dimension other than batch should
not be covered by loop.

In case of dynamism in dimension other than batch eltwise
will be considered unsupported for sub-graph extraction.

* [IE][VPU][nGraph]: Enables binary eltwise slice

Since extract dynamic batch transformation will handle
dynamism only by batch (so requires body loop to be static)
operations with dynamism in dimension other than batch should
not be covered by loop.

In case of dynamism in dimension other than batch eltwise
will be considered unsupported for sub-graph extraction.

It's template function since different binary eltwise
operations have the same broadcasting rules.

* [IE][VPU][nGraph]: Enables extract dynamic batch transformation

General approach is following:

1. Extracted sub-graphs should have exactly one input and output
   operation. Otherwise, it's possible that memory consumption of
   model will be increased since loops implementation on Myriad-X
   requires to keep all inputs and outputs of loop to be alive
   along with memory used by loop body. In layout consolidation
   scenario it reflects intention to use minimized amount of
   permutations.

2. Extracted sub-graph should not have external connections (
   the only nodes that allowed to have predecessor or successor
   outside of sub-graph are input and output). Otherwise, it's
   possible that memory consumption of model will be increased
   for the same reason as in previous point.

   To make sure this restriction is met transformation looks
   for leaves in both directions, finds corresponding LCA
   (Lowest Common Ancestor) and checks if such sub-graph has
   external connections. If so, it repeats leaves search
   procedure stopping if it approaches leaves from previous
   iteration and finds LCA again. It is repeated until
   sub-graph without external connections is found (it exists,
   at least source itself forms it).

   Leaf in current context is a node which satisfies one of
   the following conditions (depending on direction):
     Top:
       1. It has no predecessors which are neither Parameter,
          nor Constant
       2. It's unknown how to slice this operation
       3. It could not be sliced (different batch for inputs and
          outputs)
     Bottom:
       1. It has no successors which are not Result
       2. It's unknown how to slice this operation
       3. It could not be sliced (different batch for inputs and
          outputs)

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-01-13 13:42:53 +03:00
Mikhail Novozhilov
9fa8ad5404
[IE][VPU]: Removed Mish decomposition (#3663)
Removed Mish decomposition because new Mish kernel implemented
2021-01-13 13:35:55 +03:00
Evgeny Lazarev
26ca9919b9
Added AddV2, FusedBatchNormV2 and FusedBatchNormV3 to the list of supported TF operations (#3829) 2021-01-13 13:26:42 +03:00
Ilya Lavrenov
b203e9e9ae
Follow up for PR #3784 (#3821) 2021-01-13 12:24:23 +03:00
Ilya Lavrenov
b452991a9a
Removed stb_image from 3rd party (#3820) 2021-01-13 12:23:18 +03:00
Ilya Lavrenov
37e051b48b
Suppress multiple linker warnings for ngraph on Win32 (#2879)
* Fixed multiple linker warnings on Win32

* Fixed linkage on Windows

* Fixed compilation for Win32

* Last fix
2021-01-13 06:40:21 +03:00
Bartek Szmelczynski
5a905238cd
add asin to unary operators tests (#3815) 2021-01-13 06:15:30 +03:00
Nikita Kudriavtsev
2ad3f1cdab
[IE][VPU]: Added addition parameters for StridedSlice (#3670)
* Added addition parameters for StridedSlice
* Firmware updated 1570 -> 1574
2021-01-12 20:20:15 +03:00
Abhishek Kulkarni
ae8a79daa3
Handle scalar inputs for MYRIAD plugin (#3784)
This change fixes the error

Input blob size is not equal network input size (1!=0)

seen when passing a scalar input to a model in the case of VPU plugins.
2021-01-12 18:41:44 +03:00
Ilya Lavrenov
4d4efdc889
Fixed compilation for Win32 (#3803) 2021-01-12 18:40:30 +03:00
Sergey Lyubimtsev
51f3b33a83
Align location to OMZ demos (#3754)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] fix file permissions for install location

* enable make install for OMZ

* Add option description

* remove OMZ fetching & install
2021-01-12 17:17:47 +03:00
Mateusz Tabaka
9996994b8d
[ONNX] remove dangling Parameters from graph (#3774)
We have models with inputs with no initializer and not connected to any other node.
2021-01-12 14:12:57 +01:00
Dmitry Kurtaev
9ab44f8d5c
[CMake] Add SHA sums for OMP packages (#3801) 2021-01-12 15:59:54 +03:00
Andrew Bakalin
24237863b2
[IE][VPU][TESTS]: Gather: support outer padding for indices (#3665)
* Update firmware
* Add the test case from the network
* Disable fp32 case, because in this case the network has output Convert which receives non-inner stride in its input which is not supported now.
* Support FP16 comparator.
2021-01-12 13:56:52 +03:00
Anton Dudchenko
f90b6e85b8
[IE][VPU]: Move Myriad QueryNetwork to a separate file (#3687)
* Move MyriadQueryNetwork implementation to a separate file
2021-01-12 12:46:52 +03:00
Anton Pankratv
943e511c58
Merged base implementation files (#3699) 2021-01-12 12:04:47 +03:00
Andrey Sokolov
bfd8f1372c
[IE][VPU][TESTS]: add implementation of layer Round to Myriad Plugin (#3667)
* [IE tests] add opset4, opset5 to the opset list
* [IE VPU] add layer Round; support DTS
2021-01-12 11:50:35 +03:00
Ilya Lavrenov
ba08abb388
Set default visibility only for ONNX (#3798) 2021-01-12 07:14:48 +03:00
Bartosz Sledz
f6c2f3cc16
Change failing test ticket number (#3677) 2021-01-12 07:10:48 +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
Vladislav Vinogradov
8ec38cf039
[cmake] Fix single config generators handling (#3794)
* Add `USE_BUILD_TYPE_SUBFOLDER` CMake option to append
  `CMAKE_BUILD_TYPE` to output binary directory.
  Initialize it to `ON` for UNIX to keep current behavior.
* Remove forced `CMAKE_CONFIGURATION_TYPES` initialization,
  use user provided value instead.

This will allow to use single config generators (like Ninja) on Windows
with MSVC compilers and get binaries in per-config sub-folders in the same
way as on UNIX.

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2021-01-11 18:38:11 +03:00