Commit Graph

227 Commits

Author SHA1 Message Date
Anna Khakimova
e00cee2fc6 Pre-processing: Split and Merge kernels refactoring. (#6205)
* * Split and Merge kernel refactoring

* * SFINAE: replace condition compilation macro with std::enable_if
2021-06-22 18:46:23 +03:00
Ilya Lavrenov
fa2f9c5201 Migrated to official GoogleTest repo (#6286)
* Move gtest to <root>/wqthirdparty

* Fixed inference engine tests

* Fixed unit-tests

* Fixed GPU

* Fixed clDNN_unit_tests compilation

* Reverted ngraph changes

* Fixed VPU tests

* Fixed deprecated tests compilation

* Removed OpenVINO clone

* Added public submodule

* Removed

* Fixed Windows

* More updates for INSTANTIATE_TEST_SUITE_P

* Use release-1.10.0

* Removed ngraph copy of gtest

* Revert "Removed ngraph copy of gtest"

This reverts commit ec9fe08d79.

* Fixes for TYPED_TEST_CASE

* Fixed GNA tests

* Updated submodule

* Updaed index

* TMP disabled tests

* Revert changes and fix compilation errors

* Fixed caching tests

* Revert back

* Revert back all

Co-authored-by: Michael Nosov <mikhail.nosov@intel.com>
2021-06-22 17:39:39 +03:00
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
Anton Dudchenko
f5fd601ff2 [IE][VPU][TESTS] Check that output blob is not nullptr for deprecated rfcn tests (#5971) 2021-06-07 10:51:14 +03:00
Szymon Irzabek
0f6f09bd3d Gna revert padded to valid convolution and 2d convolution decomposition transforms (#5941)
* Revert "Gna conv2d decompose (#5604)"

This reverts commit f6c3b90364.

* Revert "GNA padded2conv tests & fixes (#5589)"

This reverts commit 5db77bf9e6.
2021-06-02 11:07:40 +03:00
Ilya Lavrenov
eff9f00320 Refactored ie_plugin_config.hpp (#5899) 2021-06-01 16:31:29 +03:00
Ilya Lavrenov
12f2bb72da Updates on deprecated stuff (#5838)
* Removed cloneFunction from ngraph CNNNetwork impl

* Removed custom clone

* Localize deprecation suppressions

* Removed Jira tickets

* Fixed MYRIAD tests compilation on Windows
2021-05-27 16:14:07 +03:00
Ilya Lavrenov
5b8b2141d4 Removing legacy from new tests infra (#5846)
* Removed old stuff

* Moved more stuff to old helpers

* Rewritten LRN tests

* Removed IRBuild_v6

* Fixed caching tests by changing test function

* Removed Jira tickets
2021-05-27 00:11:13 +03:00
Elizaveta Lobanova
ee368fb828 [GNA] Fixed errors about unsupported 1d tensors (#5667) 2021-05-21 18:55:59 +03:00
Szymon Irzabek
f6c3b90364 Gna conv2d decompose (#5604)
* adding conv2d decomposition

* save point

* build of conv_2d factorization succeeds

* working 2d conv decomposing transform

* added pseudo code for handling larger kernels

* fix conv splitting due to size

* active work on convolution 1xK without dilation

* validated NHWC ordered networks with convolution kernel sizes:
3x3
3x1
5x1
1x5
1x3

TODO: 2d max pooling

* removed debug printouts

* fusing max pooling/bias/af when -disable_nhwc_to_nchw option is used

* code cleanup

* [GNA] Fixes for CI run

* [GNA] Add tests, fix transform

* [GNA] Fix padded2valid and conv2d decomposition coexistence

* [GNA] Temporarily disable tests due to mock call count issues

* [GNA] Split tests for different hw versions

Co-authored-by: prozen <piotr.rozen@intel.com>
2021-05-20 11:01:29 +03:00
Mikhail Nosov
94fb9337ed Returned back original copyrights for npy.hpp (#5692)
Original source code repo: https://github.com/llohse/libnpy
SHA of original commit: d3fd88697889cefb466b647d3034c1d7b7f615ff

In OpenVINO repo there are some modifications, thus Intel's copyrights are kept as well
2021-05-19 18:30:01 +03:00
Ilya Lavrenov
181ad06668 Auto (#5645)
* Added LoadNetwork(filename) to AUTO

* Added more files

* So pointer can be used without loading

* Changed InferencePlugin, ICore to return internal interfaces

* Added SoPointers for InferRequest, ExecutableNetwork

* Fixed Windows

* Fixed KMB

* Fixes for KMB

* Removed dereference operator

* Play with include files

* Fixed compilation with older compilers

* Fixed comments

* Fixed win build

* Try  to fix Windows

* Try  to fix Windows 2

* Fixed windows

* Fixed windows

* Removed SOPointer as a base class

* Reverted back SOPointer split

* Code review

Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
2021-05-19 13:18:58 +03:00
Ilya Lavrenov
f84b25722c Removed legacy dependency on snippets (#5656) 2021-05-18 00:24:37 +03:00
Ilya Lavrenov
a3448032ca Minimized legacy usage in tests (#5591)
* Minimized legacy usage in tests

* Use legacy only for specific files

* Fixed code style

* Fixed linkage

* Removed old CPU / GPU tests binaries

* Test

* Disabled IB console

* Disabled test for AUTO QueryNetwork from parallel threads
2021-05-14 18:47:54 +03:00
Ilya Lavrenov
c76c0eb39e Moved ie_tests to legacy (#5561)
* Removed obsolete tests files

* Removed old SLT

* Moved ie_tests to legacy
2021-05-12 12:57:48 +03:00
David Nam
1b8a0f7ae5 [UnitTest] Reset shared-pointer explicitly in MklDnnFunctionalTest (#5543) 2021-05-07 23:40:43 +03:00
Ilya Lavrenov
349e2910fe Openvino autogenerated cmake (#5484)
* Exclude xbyak from install

* Added automatically generated InferenceEngineConfig.cmake

* Reverted a version back

* Fixed issues with target aliases

* Make TBB dependency private

* Made ie_parallel.cmake self-sufficient

* Don't expose ie_paralle.cmake to end users

* Fixed compilation with TBB

* Fixes for TBB

* Fixed vpu_graph_transformer compilation

* Fixed tests compilation

* Added install of ie_parallel.cmake

* Switched ENABLE_ALTERNATIVE_TEMP to OFF. Fixed COMPONENTS for TBB

* Fixed file name in install rules

* Added find_dependency for TBB in ie_parallel.cmake

* WA for cmake bug with PACKAGE_PREFIX_DIR

* Fixed no-deprecation to fix speech-library build

* Reverted version from 2.1.0 to 2.1

* Revert "Reverted version from 2.1.0 to 2.1"

This reverts commit 7cb5d1563c.

* Returned custom version file back

* Added InferenceEngineConfig-version.cmake to share as well

* Disabled one more GPU test

* Added one more WA for CI

* WA for CI issue for C API

* WIP
2021-05-07 11:57:51 +03:00
Szymon Irzabek
ed255eee71 [GNA] Additional PWL segments are added to avoid saturation (#5399)
* [GNA] Additional PWL segments are added to avoid saturation

After design phase for PWL segments has finished,
additional segments are added to avoid saturation.

This commit also reduces the number of PWL segments created
for some layer types.

* [GNA] Make PWL unit tests take into account saturation errata
2021-05-07 11:13:05 +03:00
Gorokhov Dmitriy
a19413c0c0 [CPU] Plugin migration on ngraph (#4344) 2021-05-06 19:49:24 +03:00
Irina Efode
935405ad2d [IE TESTS] Remove dummy file for beh tests (#5436) 2021-05-06 12:56:09 +03:00
Ilya Lavrenov
b47d11e31e Removed useless iostream include (#5357)
* Removed useless iostream include

* Fixed samples compilation

* Klockwork fixes for template plugin
2021-05-03 17:12:00 +03:00
Ilya Churaev
ff9e67e732 Skip MVN operation on constant branches (#5460)
* Skip MVN operation on constant branches

* Added test
2021-04-30 10:37:27 +03:00
Ilya Lavrenov
c350f61a42 Move all base wrapper classes from Plugin API to source folder (#5419)
* Small refactoring in TEMPLATE plugin

* Fixed compilation on Windows

* Fixed code style

* Hide CALL_STATUS_FNC helpers to private API

* Moved some base classes to private place from plugin_api

* Updates for VariableState creation

* Take Jane's changes for Demension names

* Revert "Take Jane's changes for Demension names"

This reverts commit 9f6c8fa5a6.

* Removed ICNNNetwork include

* removed more icnnnetwork includes

* Added missed include with ie_input_info.hpp

* Fixed GNA plugin to provide names w/o \0
2021-04-29 19:50:46 +03:00
Mikhail Nosov
6624a77827 Disabled sporadically failed GNAAOTTests (#5455) 2021-04-29 14:10:21 +03:00
Anna Khakimova
b1a4a73328 Pre-processing: Adding DivC and SubC kernels. (#5364)
* [PP] FLuid level tests for mean value preprocessing

* PP] Fluid operations for mean value preprocessing

* * Relaxed tolerance and fix for issue.

* * Fix for issue.

* * Applied comments.

Co-authored-by: Anton Potapov <anton.potapov@intel.com>
2021-04-29 13:38:28 +03:00
Mikhail Nosov
05cae2714f Generate unique file names for GNAAOTTests (#5403)
Issue can be reproduced on stress testing:
Get stress scripts from git@github.com:google/gtest-parallel.git
> python3 <workdir>/gtest-parallel/gtest_parallel.py  ./InferenceEngineUnitTests --gtest_filter=*GNAAOT* -r 100

It starts each test separately in different threads/processes and there is big chance of conflicts with unit_tests.bin
2021-04-27 08:59:20 +03:00
Roman Donchenko
ed5313b2e1 Fix common misspelling: wraper -> wrapper (#5355) 2021-04-26 13:42:12 +03:00
Alexandra Sidorova
0d3baee1f3 [CPU] [IE TESTS] Added improvements for DepthToSpace and SpaceToDepth (#3897) 2021-04-21 16:45:07 +03:00
Ilya Lavrenov
02bc98a03f Removed suppressions for IInferRequest deprecation (#5310)
* Removed suppressions for IInferRequest deprecation

* Fixed Windows

* More fixes for Windows

* Fixed compilation on Windows

* Fixed comment in documentatipn

* Fixes for Andorid

* Fixes for old gcc 4.8

* WA for cross-compilations

* Fixed compilation

* Fixed HETERO plugin compilation for old compilers

* Flags

Co-authored-by: lab_ddpqa <lab_ddpqa@intel.com>
2021-04-21 16:05:30 +03:00
Anton Pankratv
46987def54 Merged internal Infer Request implementation (#5125) 2021-04-19 15:16:47 +03:00
Alexandra Sidorova
37893caa36 [CPU] Added improvements for StridedSlice (#4248) 2021-04-08 13:17:29 +03:00
Anton Pankratv
b20d9b725c Used internal exec network impl (#4922) 2021-04-08 12:29:41 +03:00
Anton Potapov
54b6c77202 [PP] Support for FP16 in Reorder cases (#4427)
- added basic support for FP16 (plain wrapper over int16_t)
 - extended Split/Merge operations to support it
 - tests
2021-04-07 14:57:52 +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
Artemy Skrebkov
76cf1b2b65 Update benchmark_app to pass precision via command line (#4318)
* Update benchmark_app to pass precision via command line

* Update vpu_perfcheck

* Update python benchmark_app to support setting precision from cmd

* Review comments

* Address more review comments

* Fixes after rebase
2021-03-26 15:07:59 +03:00
Alexey Suhov
a748c26fee Align copyright notice in cpp and cmake source files (CVS-51320) (#4950) 2021-03-25 02:40:09 +03:00
Anton Pankratv
3b3d9a0989 Used IE_THROW macro (#4869)
* Added ie throw macro

* Used IE_THROW macro
2021-03-23 18:57:12 +03:00
Anton Pankratv
a2b8b974b8 Simplified IE Exceptions Implementation (#4258) 2021-03-18 16:30:16 +03:00
Ilya Lavrenov
24fb09edb3 Improvements in cmake scripts (#4766)
1. Find Threads only once in IEDevScripts package
2. Small refactoring in IE Dev Package
2021-03-15 13:07:38 +03:00
Ilya Lavrenov
753f4d5918 Second attempt to fix CVS-50011 (#4659)
* Second attemp to fix CVS-50011

* Clarified OpenCV dependencies

* Fixes
2021-03-15 13:04:20 +03:00
Marina Kolpakova
6e490c24e2 [§] introduces snippets generator (#4349) 2021-03-10 14:15:38 +03:00
Anton Pankratv
a5e2497788 Synchronous inference using stream executor affinity and parallelism constraints (#528)
* Syncronous inference using stream executor affinity and parallelizm constraints

* Fixed review coments
2021-03-09 20:32:14 +03:00
Anton Pankratv
2fcf92be42 Removed IRelease Interface (#4032) 2021-03-05 12:08:01 +03:00
Piotr Rozen
bf467e097f [GNA] Fixed issue with multiple connections between pair of nodes (Split=>Concat) (#3953)
* fixed: gna split-concat-concat sequence issue
fixed: gna permute-conv-maxpool-permute issue

* fix issue with multiple connections between split|crop|memory & concat
fix issue with serializing IR V7 model

* fixed: gna split-concat-concat sequence issue
fixed: gna permute-conv-maxpool-permute issue

* fix issue with multiple connections between split|crop|memory & concat
fix issue with serializing IR V7 model

* fixed issues after rebase

* Fix for the test TEST_F(FP32NonQuantizedTest, LSTMCellPropagateForward)

Input x[96] = 0.1
Scaled input = 0.01
Affine output = 64 * 0.01 * 0.1 + 0.1 = 0.164
Sigmoid(Affine output) = 0.541
Tanh(Affine output) = 0.163
Sigmoid(Affine output)*Tanh(Affine output) = 0.088

Sigmoid(Affine output)*Scaled input = 0.005

H = Sigmoid(Affine output)*Tanh(Affine output) + Sigmoid(Affine output)*Scaled input = 0.093
tanh(H) = 0.093

Result = H + Sigmoid(Affine output)*Scaled input = 0.093 + 0.541*0.093 = 0.093 + 0.050 = 0.143

* Updated copyright date

* [GNA] Added tests for cases connection split->concat

* [GNA] Added fix memory -> concat case

* fixed inf loop during quantization

* fixed code formatting

* fixed failing test smoke_concat_quant_memory_requant/ConcatQuantDuringMemoryRequantTest.CompareWithRefs/netPRC=FP16_IS=128_HS=128_targetDevice=GNA

* fixed removed & mark from pass manager main for loop

* added split=>concat case to InsertCopyLayerPass

Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2021-03-03 12:54:09 +03:00
Ilya Lavrenov
1d88cdc45e Fixed gtest build / usage in case of RelWithDebInfo (#4554)
* Fixed gtest build / usage in case of RelWithDebInfo

* Added more modules to fluid_preproc_tests tests
2021-03-03 07:27:23 +03:00
Vladimir Paramuzov
a5aaa07721 [IE CLDNN] OpenCL headers update (#4345)
* [IE CLDNN] OpenCL headers update

* Add Win64 Release OpenCL.lib

* Update Windows ICD *.lib

* [IE CLDNN] Linux and Android libraries

* Update ICD for linux

* Update android ICD

* va.h stub

* Add ICD loader revision

* USM fix

* fixed ambiguous calls

* Updated licence files

* try fix centos

* fix x64 debug icd lib

Co-authored-by: Andrey Babushkin <andrey.babushkin@intel.com>
2021-02-19 13:19:45 +03:00
Ilya Lavrenov
edbb802e55 Removed some legacy code (#4371) 2021-02-17 13:57:14 +03:00
Maksim Kutakov
24aeb16fd1 [CPU BF16] OneHot layer extended with bf16 support. (#4171) 2021-02-17 10:52:23 +03:00
Andrey Dmitriev
5866f713d9 [GNA] Added test for backward compatibility (#4315) 2021-02-15 14:46:56 +03:00
Evgeny Lazarev
3f5ff2cfe5 Remove generic ie op (#4213)
* Removed legacy IE shape infer

* Removed GenericIE operation

* Removed legacy shape infer tests

* Removed legacy test with legacy IE reshape

* Fixed compilation issues related to removal of GenericIE

* Fixed one more compilation issue with clDNN

* Fixed test for reading experimental ops

* Updated tests and make IR Reader to load old experimenal and extension ops as opset6

* Change opset of some ops only if they are currently experimental/extension to avoid situation like opset1::Proposal -> opset6::Proposal

* Removed more legacy code

* Returned back code removed by mistake

* Fixed issues related to incorrect merge with master

* Merge fixes

* Fixed unit tests which starts to fail because now loading the model with unknown operation is failed earlier

* Removed incorrectly added code

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2021-02-13 21:15:46 +03:00