Commit Graph

387 Commits

Author SHA1 Message Date
Gladilov, Gleb
e61a594199 [IE][VPU]: Configuration options in VPU plugins refactoring (#3211)
* [IE]: Enables Abstract class -> Parameter conversion support

Parameter has templated constructor allowing to write code

```
Parameter p = i; // i of type int for example
```

This constructor uses SFINAE to resolve ambiguity with
move-constructor, so checks that argument is not of the same type.
In case it's not the same type it calls std::tuple constructors that
constructs an instance of argument type. In the following case:

```
Parameter p = static_cast<Parameter>(abstractRef);
// abstractRef is a reference to abstract class
```

We have a reference to some abstract class that defines explicit
cast operator to Parameter. In contrast with expectations,
instead of cast operator, Parameter constructor is instantiated,
since template type deduction for Parameter constructor didn't fail
(abstract class has not the same type as Parameter). Instantiation
of tuple constructor used inside failed: it's impossible to create an
instance of abstract class what lead to compile-time error. To resolve
the issue additional condition introduced to check if argument type is
abstract.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE]: Enables PrintTo method for Parameter and tests on it

Inference Engine API for configuration options uses Parameter
type as a return type of GetConfig method. Parameter is intended
to store object associated with configuration option.
To support objects of different types its constructor is templated.
Parameter overloads cast operators which are templated
as well. Both constructor and cast operators are implicit, which
makes it possible to implicitly convert any type to Parameter
and vice versa.

Since Parameter is a part of Inference Engine configuration API it's
essential google tests on API contain Parameter as tests parameter.
For each test parameter Google Test framework tries to print it to
an output stream. For that purpose, Google Test checks if test
parameter has output stream operator or PrintTo method. If not, it
checks if it could be implicitly converted to integral type and,
in this case, prints it as a long integer.

InferenceEngine::Parameter does not define output stream operator,
but could be implicitly converted to an integer, according cast
operators mentioned above, so Google Test tries to convert to
integer. Since Parameter not necessarily contains integer, this
conversion throws an exception of type mismatch, which makes it
impossible to use Parameter in Google Test framework as is.

In order to resolve that issue Parameter should define either
output stream operator or PrintTo method. If Parameter will
define output stream operator it will make it possible to compile
streaming almost any object to an output stream. The reason for it
is C++ checks if object could be implicitly converted to other type
which defines output stream operator, if objects itself doesn't do it
(e.g. `stream << "text";` calls std::string::operator<<, since
char const* is implicitly convertible to std::string).

Taking this into consideration the only way to support Parameter in
Google Test without breaking backward compatibility is define PrintTo
method.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE]: Fixes ill-formed extending std names

According to the standard:

The behavior of a C++ program is undefined if
it adds declarations or definitions to namespace
std or to a namespace within namespace std unless
otherwise specified. A program may add a template
specialization for any standard library template
to namespace std only if the declaration depends
on a user-defined type and the specialization meets
the standard library requirements for the original
template and is not explicitly prohibited.

As as an unexpected result, InferenceEngine::Parameter
that contains std::vector<std::string> can be printed
via PrintTo. In that case operator<< version from
Inference Engine is picked up.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Moves CompilationConfig out of GT header

Keeping config in a separate header simplifies migration
to new interface.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Removes Platform enum

Since there is enum from MVNC for the same purpose
there is no need in Platform anyway

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Introduces containers utility header

Contains some helpers to work with C++ maps

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Introduces new configuration API

The main ideas are separate option-specific logic
from common container, automate logic processing
public vs private, deprecated, compile-time vs
runtime-time options and remove code duplication.

Since IE defines configuration API using std::string
and Parameter, options have to provide ways to be
represented as Parameter (ex.: GetConfig is called)
and be defined using std::string (ex.: SetConfig is
called). Keeping information about actual key value
is useful for error reporting.

New API fallbacks to previous version in case of
unsupported options are requested. This way migration
becomes iterative and looks simpler.

Options containers are related to corresponding components:
CompilationConfig (name to be changed) - GraphTransformer,
PluginConfiguration - base class for plugins configurations,
MyriadConfiguration - Myriad plugin configuration,
HDDLConfiguration - HDDL plugin configuration (to be
introduced in a separate request)

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Replaces CompilationConfig with PluginConfiguration

Some of options to be refactored are stored inside CompilationConfig.
CompilationConfig is passed to graph transformer as a compiler to be
processed. Since it's separate data structure and migration process
is iterative we need a mechanism to provide some of compilation
options from new interface and some from old. It cannot be done via
plugin specific class (MyriadConfiguration), since there are others
plugins as graph transformer users. Plugin specific class
(MyriadConfiguration) already inherits from old version (MyriadConfig),
which in turn inherits from ParsedConfig containing CompilationConfig.

To resolve the issue MyriadConfig inheritance from ParsedConfig is made
virtual to make it possible for PluginConfiguration to virtually inherit
from ParsedConfig as well an so make PluginConfiguration data structure
for configuration options for graph transformer. Since
PluginConfiguration is base class of MyriadConfiguration as well as
MyriadConfig and inheritance is virtual plugin just casts its specific
configuration to base one passing to graph transformer.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Enables new tests on configuration API

* Enables following new shared tests on configuration API
  * Can load network with empty configuration
  * Check default value for configuration option
  * Can load network with correct configuration
  * Check custom value for configuration option (set and compare)
  * Check public configuration options are visible through API
  * Check private configuration options are invisible through API
  * Check GetConfig throws an exception on incorrect key
* Refactors myriad plugin instantiations for shared tests

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Extracts LogLevel enum to a separate header

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Refactors LOG_LEVEL configuration option

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Refactors COPY_OPTIMIZATION configuration option

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Fixes behavior tests build

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Updates tests on new exception class

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Removes unused variable from mvnc test

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Removes SizeVector streaming call

New assertion macro IE_ASSERT implementation uses
output streaming operator with r-value reference
argument as a stream. This prevents the compiler
from picking up overload from InferenceEngine::details,
since our version takes stream by non-const l-value
reference.

Since there is no simple solution to provide output
streaming operator overload for r-value references as
well and this call is just a message for assert in
test utilities, it was decided just to remove call
for now.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-06-17 18:54:39 +03:00
Taylor Yeonbok Lee
b8313c4fae [IE CLDNN] Disable crop optimization only when the node is inside a loop body program (#6192) 2021-06-16 17:47:08 +03:00
Vladislav Volkov
99ebda98f1 [CPU] Memory leak in jit_uni_i8i8_pooling kernel (#6188) 2021-06-16 15:54:40 +03:00
Vladimir Paramuzov
2f81968a31 [IE CLDNN] Introduced new runtime API (#5417) 2021-06-16 09:27:16 +03:00
Ilya Znamenskiy
6ec725baac Revert "[IE CLDNN] Use fsv4 when feature-depth is shallow (#4398)" (#6103) 2021-06-09 23:39:51 +03:00
Ivan Novoselov
8c74a0a52c [CPU] Fixed reorder for strided both inputs and outputs (#6082) 2021-06-09 14:27:43 +03:00
Alexandra Sidorova
9214fa72e2 [CPU] Fixed AvgPooling and FQ fusing (#5994) 2021-06-08 14:04:31 +03:00
Ilya Lavrenov
1fa225e7bf Python in OpenVINO: improvements (#6027)
* enable make clean to remove ie_wheel artifacts

* ./setup.py:132:1: E302 expected 2 blank lines

* fix CI build issue

* Removed not-needed components from ie_wheel

* Use explicit python3 vresion in ngraph pythpn

* Use python3 everywhere

* Reuse python3 more

* Added function to build with Py_LIMITED_API

* Sync 2 cmake python modules

* Fix for tools

* Fixed typo

* Enable python by default

* Enable python build iff python-dev is found

* More migration to Python3_VERSION

* Install wheel requirements

* Fixed ngraph Python separate build

* Fixed cython compilation

* Revert to old packages

* Added suffix

* Specify python version explicitly

* Don't depend on python interp to build python itself

* More improvements

* Revert offline transformations back to ie_wheel

* Refactoring

* Trying to build wheel independently on C++ runtime

* Build wheel only with main OpenVINO

* Fixed typo in test_utils cmake lists

* Adding link stage

* small fix

* git diff

* Try to fix python tests

Co-authored-by: Sergey Lyubimtsev <sergey.lyubimtsev@intel.com>
2021-06-07 10:52:48 +03:00
Taylor Yeonbok Lee
a40cf0e81c [IE CLDNN] Restore DetectionOutput performance and fixed coding conventions to be alined with others (#6048) 2021-06-07 10:28:15 +03:00
Eunsoo Sheen
abed119e88 [IE CLDNN] fix klocwork issue (#6050) 2021-06-07 10:23:44 +03:00
Anton Voronov
81be8c94b0 [CPU] Deconvolution int8 fusing support (#5683) 2021-06-04 16:46:13 +03:00
Andrei Molotkov
563a095bc1 [IE CLDNN] Fix performance degradation on yolo models (#5876) 2021-06-04 12:41:13 +03:00
Taylor Yeonbok Lee
d3a5c67f3b [IE CLDNN] crop + NMS should not be merged because optimizing out crop will add unexpected padding while NMS cannot handle it properly (#6015) 2021-06-04 12:19:40 +03:00
Ilya Znamenskiy
ebe5349d6f [IE CLDNN] Binary convolution fsv16 kernel: eltwise fusing improvements (#5989) 2021-06-03 11:23:56 +03:00
Vladislav Volkov
229cf10db5 [CPU] Memory leak in jit_uni_fork_softmax kernel (#5947) 2021-06-03 10:40:13 +03:00
Eunsoo Sheen
3c9092ffb8 [IE CLDNN] Fix klocwork issue (#5942) 2021-06-02 14:25:07 +03:00
Roman Lyamin
c8a5044664 [IE CLDNN] Add Select int32/int16 input support (#5877) 2021-05-28 18:00:51 +03:00
Ilya Znamenskiy
3954c3f99d [IE CLDNN] Perf improvements: fusings for bin convolution and FC, permute reorder fix (#5761) 2021-05-28 13:15:11 +03:00
Eunsoo Sheen
d05c3c63b5 [IE CLDNN] Add an initial loop primitive for fixed length sequence (#4954) 2021-05-28 11:55:48 +03:00
Sergey Shlyapnikov
51084847b3 [IE CLDNN] Crop fsv16 i8/u8 input support (#5865) 2021-05-28 09:43:34 +03:00
Kelvin Choi
d2f7812dbd [IE CLDNN] Optimize reorder between blocked formats and non blocked formats (#5297) 2021-05-27 15:19:00 +03:00
Sungeun Kim
163d0b27b0 [IE CLDNN] Fixed a region_yolo bug (#51761) (#5826)
Signed-off-by: Kim, SungEun <sungeun.kim@intel.com>
2021-05-26 20:21:42 +03:00
Roman Donchenko
68cadf1ff9 Fix spelling errors in file names (#5776)
And similar errors in file contents.
2021-05-25 12:52:58 +03:00
Maksim Kutakov
617636693a [CPU] Nspc layout enabling in the FP32/BF16 convolutions (#5292) 2021-05-25 11:41:23 +03:00
Min, Byungil
e41f378967 [IE CLDNN] Bugfix in eltwise ref and optimizing for fsv4 layout (#5104) 2021-05-25 09:24:34 +03:00
Vladimir Paramuzov
b87fa84c9f [IE CLDNN] Fixed cpplint for clDNN with Ninja generator (#5760) 2021-05-24 14:09:10 +03:00
Taylor Yeonbok Lee
e3b4037b69 [IE CLDNN] Fixed permute reorder fusing bug for blocked format => non blocked format (#5754) 2021-05-24 09:46:11 +03:00
Anton Voronov
5e4c3c4804 [CPU] Deconvolution int8 support (#5565) 2021-05-21 13:54:56 +03:00
Roman Lyamin
5a42015e76 [IE CLDNN] Memory dependencies fix (#5480) 2021-05-21 13:42:31 +03:00
Maksim Doronin
15127712a4 [IE][VPU]: Write info about booted device only on success (#5734)
* Copy a string with an address of the booted device only when the device has been successfully been booted. Otherwise, we should free allocated by strdup memory or we will get a memory leak.
2021-05-21 12:48:07 +03:00
Yunji Kim
cdc98d7286 [IE CLDNN] Fix DetectionOutput cpu implementation to be aligned with ngraph (#5544) 2021-05-20 11:04:50 +03:00
Vladimir Paramuzov
d52c4d433a [IE CLDNN] QueryAPI extension with gpu device info (#5440) 2021-05-19 16:44:40 +03:00
Andrei Gorbachev
ae9f3ebc5d [IE CLDNN] Add Gather-7 (#5360) 2021-05-19 15:03:47 +03:00
Vladimir Paramuzov
647acffd1d [IE CLDNN] Fixed eltwise shrink when node has fused ops (#5570) 2021-05-17 13:21:24 +03:00
Andrei Molotkov
c67c2f4691 [IE CLDNN] Improving graph initialization step (#5602) 2021-05-14 19:35:08 +03:00
Ilya Lavrenov
07a49184c0 Fixed typo in length (#5611) 2021-05-13 07:52:55 +03:00
Paul Youngsoo Ahn
ed4d3fc4ed [IE CLDNN] Disable extended eltwise fusing on gen12 (#5584) 2021-05-12 16:00:12 +03:00
Ilya Lavrenov
a13bd518fc [IE CLDNN] Fixed CLDNN internal tests compilation (#5597) 2021-05-12 13:24:18 +03:00
Alexandra Sidorova
87a94e1a49 [CPU][IE TESTS] Fixed Mish (#5462) 2021-05-12 09:57:52 +03:00
Andrei Molotkov
d4a883429d [IE CLDNN] Fix segmentation fault for hetero plugin mode (#5548) 2021-05-07 15:13:18 +03:00
Andrey Zaytsev
5e4cd1127b Integrate UAT fixes (#5517)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Edits to MO

Per findings spreadsheet

* macOS changes

per issue spreadsheet

* Fixes from review spreadsheet

Mostly IE_DG fixes

* Consistency changes

* Make doc fixes from last round of review

* integrate changes from baychub/master

* Update Intro.md

* Update Cutting_Model.md

* Update Cutting_Model.md

* Fixed link to Customize_Model_Optimizer.md

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Co-authored-by: baychub <cbay@yahoo.com>
2021-05-06 15:37:13 +03:00
Vladimir Paramuzov
30b9d2ba13 [IE CLDNN] Disabled vectorized ocl path for modes with bool output (#5521) 2021-05-06 11:33:14 +03:00
Vladimir Paramuzov
fa4a67ab25 [IE CLDNN] Fixed FQ in byxf layout and pooling in fsv32 with int8 input (#5431) 2021-05-06 11:31:29 +03:00
Andrei Molotkov
f93c5e09aa [IE CLDNN] Fix bug with incompatible node and memory layouts (#5499) 2021-05-04 17:06:57 +03:00
Nico Galoppo
895b605c06 [IE CLDNN] Fix OpenCL dependency for clDNN tutorials (#5491) 2021-05-04 15:52:33 +03:00
Paul Youngsoo Ahn
29a8be523d [IE CLDNN] Extended eltwise fusing (#5181)
* [cldnn] Add initial fused conv eltw POC

- Add cldnn unit test
- Add fused dependency list to the fused_primitive_desc
- fuse_nodes update for saving fusing history and depenecies
- Modify Jitter to create jit constants using fused dependencies
- Add cldnn unit-test cases for multiple serial and parallel eltwise fuse pattern
- Modify Jitter and add default values in sum input

Signed-off-by: Ahn, Paul Y <paul.y.ahn@intel.com>

Co-authored-by: Andrew Kwangwoong Park <andrew.kwangwoong.park@intel.com>

* [cldnn] Update fused_conv_eltwise cldnn unit test

- Add execute and compare function
- Add cldnn unit-test case for multiple parallel eltwise and additional eltwise
- Add cldnn unit-test case for combination of multiple parallel eltw
- Add cldnn unit-test cases for serial and diverged quantize and eltwise

Signed-off-by: Andrew Kwangwoong Park <andrew.kwangwoong.park@intel.com>

* [cldnn] Modify checking fusibility of eltwise fusing

- Add new checking fusibility rule in prepare_primitive_fusing
- Move cldnn eltwise fusing test to fusing_gpu_test.cpp
- Modify method to get input var name in  jitter

Signed-off-by: Ahn, Paul Y <paul.y.ahn@intel.com>

* [cldnn] Fix fusing item type and activation fusibility checking condition
- Extract input_data_supports_fusings from fuse_activaion_f
- Fix checking supported mode bug

Co-authored-by: Andrew Kwangwoong Park <andrew.kwangwoong.park@intel.com>
2021-05-04 09:57:06 +03:00
Alexandra Sidorova
03ca3d1ef7 [CPU] Fixed SoftPlus for large positive values (#4932) 2021-04-30 13:34:33 +03:00
Ilya Lavrenov
c52117a09f Fixed compilation with ninja + clang (#5469) 2021-04-30 08:57:03 +03:00
Taylor Yeonbok Lee
05dc0c8cf7 [IE CLDNN] WA for memory increase problem of parallel build for OCL (#5389)
In linux, without malloc_trim, some freed memories are not being returned to system.
Current hypothesis is that a large allocation for compilation is not completely freeed, thought mostly freed.
This does not happendin Windows.
So, added malloc_trim for linux build until we figure out a better solution.
2021-04-29 18:27:05 +03:00
Elizaveta Gerashchenko
bc5b3c14bd [IE CLDNN] Generation of undefs optimization (#5158) 2021-04-28 14:35:54 +03:00