Commit Graph

105 Commits

Author SHA1 Message Date
Ilya Lavrenov bc36425381
Added suggest-override flag (#6631) 2021-07-16 18:55:05 +03:00
Ilya Churaev 811f4c5ae9
Template reference tests (#6456)
* Added convert tests

* Moved convert tests to template plugin

* Fixed build

* Fixed comments

* Fixed templateFuncTests

* Fixed review comments

* Added dynamic registration of template plugin

* Fixed functional tests

* Fixed behavior tests

* Added ticket

* Try to avoid fails
2021-07-12 14:24:36 +03:00
Xie Zhengtian c0f227bddd
[AUTO][IE TESTS] Fix IE test issue for auto-device plugin (#6113)
* Auto will throw with incorrect config

* Update func tests for auto-device plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>
2021-06-29 16:14:28 +03:00
Maxim Shevtsov 9422a7b240
fixed multi/hetero setConfig to throw on unsupported config keys (#6373)
* fixed multi setConfig to throw on unsupported config keys

* fixed hetero setConfig to throw on unsupported config keys. simplified the test on the incorrect keys

* aligning MULTI tests to the new (fixed) behaviour - also aligned with AUTO and HETERO

* fixed multi setConfig to throw on unsupported config keys- updating the MYX tests
2021-06-29 15:52:12 +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
Ilya Lavrenov 6e2d13937a
ImportNetwork with explicit device name only (#5689)
* Import with explicit name

* Fixed LoadHetero_MultiArchs tests

* Fixed MYRIAD tests on Windows

* Fixed compilation in tests

* Updated tesets

* Fixed test

* Removed useless lines

* Removed custom VPU tests, replaced with common ones

* Fixed Windows

* Reverted SKIP_IF_NOT_IMPLEMENTED macro
2021-06-09 10:09:25 +03:00
Ilya Lavrenov a36d6a0f06
Used setMeanImageForChannel (#6076) 2021-06-08 19:33:51 +03:00
Shoujiang Ma dcf36565b0
[AUTO plugin] AUTO plugin will ignore other plugins' configuration (#5979)
* AUTO plugin will ignore other plugins' configuration

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Update tests

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Support PER_COUNT config which is needed in benchmark_app

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Address reviewer comments: check config and throw exception for unsupported, but that begin with "AUTO_" will be ignored

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Fix CI tests issue

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>
2021-06-08 12:11:58 +03:00
Nikita Semaev c77b4dc4ed
[IE TESTS] Incorrect calculation for 'Convert' number of test crashes (#5922)
* Hiding the problem, but not solving it, Validate() changes the value of a variable function

* [IE TESTS] Convert issue

* [IE TESTS] Solving the problem of adding an extra layer
2021-06-02 16:50:40 +03:00
Yury Gaydaychuk 1264376173
[CPU] Extended preprocessing for CPU (#5750) 2021-06-01 17:03:24 +03:00
Ilya Lavrenov eff9f00320
Refactored ie_plugin_config.hpp (#5899) 2021-06-01 16:31:29 +03:00
Ilya Lavrenov d65778b6d9
Fixed templatePlugin tests on IA32 (#5901)
* Fixed templatePlugin tests on IA32

* Disabled tests on MYRIAD
2021-06-01 10:21:14 +03:00
Ilya Lavrenov 26bfa6f0ac
Tests for dynamic preprocessing in SetBlob (#5798)
* Corrected tests to match CVS-53713

* Fixed tests configs

* Skip tests on GPU

* Commented condition inside main SetBlob because of MYRIAD

* Adopted tests
2021-05-26 18:07:08 +03:00
Ilya Lavrenov 87806320ab
Added preprocessing test which check whether specified and actual format can be different (#5771) 2021-05-25 07:12:39 +03:00
Ilya Lavrenov b7c5edc944
Deprecated all ICNNNetwork methods (#5488)
* Deprecated ICNNNetwork

* ICNNNetwork deprecation

* Fixed comments

* More suppressions for ICNNNetwork

* Fixed C API compilation

* Deprecated ICNNNetwork methods only

* [IE CLDNN] Fixed cpplint for clDNN with Ninja generator

* Fixed compilation for ApiVersion with clang

Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com>
2021-05-25 07:11:55 +03:00
Shoujiang Ma 370617d909
Auto plugin async infer request implementation (#5707)
* Async auto-request, now with revamped SetCallback (after https://github.com/openvinotoolkit/openvino/pull/5645 merged) it is safe to set.
Also test modification to verify that the callback is called on the same (user's) request and e.g. not on the actual device's request

* Override CreateInferRequestImpl() instead of CreateInferRequest()

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

Co-authored-by: myshevts <maxim.y.shevtsov@intel.com>
2021-05-20 15:05:37 +03:00
Shoujiang Ma 90a18d9cef
[AUTO] Implement auto-plugin limited devices feature (#5545)
* Update SelectDevice policy in auto plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Implement limit device list for AUTO plugin

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Add tests for AUTO limit device feature

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Add gpu tests for auto-plugin

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Fix CI cpuFuncTests issue due to BATCHED_BLOB

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Override LoadNetwork(modelPath, config) in AUTO plugin

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Update SelectDevice() logic for LoadNetwork(model, config)

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Update GetNetworkPrecision logic for auto-plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Address reviewers' comments

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Add tests for AUTO:GPU,CPU case

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Update logic in GetNetworkPrecision for auto-plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Address reviewer's comment: clean and simplify code

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Fix wrong usage of convolution weight index

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Address reviewer comment: fix get network precision logic

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Fix rebase issue

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Fix ie_core.cpp header change

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

Co-authored-by: zhengtian.xie <zhengtian.xie@intel.com>
2021-05-19 23:47:54 +03:00
Anton Pankratv ec5aa2fefd
Fixed legacy API set get user data method (#5690) 2021-05-19 18:46:10 +03:00
Vladimir Paramuzov d52c4d433a
[IE CLDNN] QueryAPI extension with gpu device info (#5440) 2021-05-19 16:44:40 +03:00
Maxim Andronov d798858b28
Disable check on result in CheckExecGraphInfoBeforeExecution (#5650) 2021-05-18 17:00:14 +03:00
Maksim Derbasov 61108f1147
Fix warnings, cl compiler (#5641)
* Fix warnings

* make cpplint happy
2021-05-18 07:32:53 +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 f88611e5a2
Removed FPGA constant from tests (#5626) 2021-05-13 21:53:08 +03:00
Shoujiang Ma 40ffca6fa2
[Auto Plugin] Auto plugin component in IE (#5366)
* Implement AUTO plugin

Usage:
	1. -d AUTO
	2. -d ""

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Add tests for AUTO plugin

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* cleaned impl, that was incorrect from the async perspective, ansl also capturing the blobs in the constructor

* Revert benchmark_app modification

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

* Address reviewer's comments: need CI tests to verify

Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>

Co-authored-by: myshevts <maxim.y.shevtsov@intel.com>
2021-05-13 17:04:38 +03:00
Gorokhov Dmitriy a19413c0c0
[CPU] Plugin migration on ngraph (#4344) 2021-05-06 19:49:24 +03:00
Ilya Lavrenov 8b1b900591
CVS-44774: Fixed preprocessing for template plugin (#4118)
* Fixed preprocessing for template plugin

* Added more tests instances

* Split common transformation to smaller ones which can be used by plugins

* Moved preprocessing transformation to Plugin API

* Added PreprocessConversionTest tests

* Disabled tests on GPU: CVS-51764

* Disabled some tests on VPU and TEMPLATE

* Support for input layout conversions in TEMPLATE plugin

* Improvements in Template Plugin

* Fixed compilation

* Fixes

* Disables some tests

* Fixed compilation on Windows

* Fixed docs
2021-04-30 10:47:29 +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
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
Aleksandr Korolev 734aafb021
[IE][VPU]: Fix batch detection/removal logic in MYX plugin (#4751)
* [IE][VPU] Fix batch detection/removal logic in MYX plugin
* Some changes & test
* The condition for skipping the CachingSupportCase MyX test has been removed
2021-04-16 10:05:49 +03:00
Anton Pankratv 232a25404f
Try to fix win hang (#4991) 2021-04-12 12:25:18 +03:00
Anton Pankratv b20d9b725c
Used internal exec network impl (#4922) 2021-04-08 12:29:41 +03:00
Ilya Lavrenov 8e261de0a8
Added PreprocessConversionTest tests (#4946)
* Added PreprocessConversionTest tests

* Disabled tests on GPU: CVS-51764

* Disabled some tests on VPU and TEMPLATE

* Support for input layout conversions in TEMPLATE plugin
2021-03-25 16:31:33 +03:00
Irina Efode fa37277e3e
[IE TESTS] Allow to save Conformance report with unique names (#4844)
* [IE TESTS] Lock report file (between processes and threads)

* Fix condition

* t

* Fix CI

* Fix ci

* win

* Fix win

* Fix reading logic

* Fix rights

* d

* Fixes

* d

* ddd

* s

* dd

* Allow to write reports by unique name

* tp

* fix ci

* remove extra lines
2021-03-25 15:29:20 +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 35bff0d8a1
Moved executable network implementation from header (#4049) 2021-03-19 11:58:16 +03:00
Anton Pankratv a2b8b974b8
Simplified IE Exceptions Implementation (#4258) 2021-03-18 16:30:16 +03:00
Mikhail Nosov 59707b7937
[Plugins test] Add func tests for import/export support by plugins (#4847)
* [Plugins test] Add functional test for correct import/export support by plugins

Test suite creates number of models with various precisions.
For each model:
- If plugin doesn't support IMPORT_EXPORT_SUPPORT metric - skip the test
- Try LoadNetwork without cache enabled fails - skip the test
- Do one inference
If Load and Infer request is succeeded and plugin has import metric:
- Load network with cache enabled. Infer request and compare outputs with original infer
- Import network, perform inference. Compare outputs with previous ones

* Fix Centos build warnings
Myriad: reset executableNetwork before next load
Myriad: Reduced time consumption for Myriad tests

* Caching test suite - batch size parameter support
2021-03-18 13:03:18 +03:00
Maksim Derbasov 2a19fc2d8a
Fix warnings spotted by cl compiler (#4793)
* Fix warnings spotted by cl compiler

* Use inline instead of anonymous namespace

* Review comments
2021-03-17 13:08:42 +03:00
Ilya Churaev 192e66e013
Restored folded Operations for QueryNetwork (#4686)
* Restored folded Operations for QueryNetwork

* Fixed comment

* Add unfolded constant operations to supported layers map
2021-03-11 10:41:52 +03:00
Anton Pankratv 2fcf92be42
Removed IRelease Interface (#4032) 2021-03-05 12:08:01 +03:00
Anton Pankratv 91dcb515a3
Simplified cancel behavior (#4224) 2021-02-09 12:55:24 +03:00
Ilya Lavrenov 500df585d1
Fixed github issue #4172 (#4201)
* Fixed github issue #4172

* Simplified tests

* Added instances to HETERO plugin
2021-02-08 12:30:54 +03:00
Ilya Lavrenov be772c58bb
Fixed "Reverse input channels" case for common Plugin API (#4142)
* Added preprocessing for GetBlob

* Fixed preprocessing tests

* Added more test cases

* Skipped tests on GPU
2021-02-03 14:21:33 +03:00
Yury Gaydaychuk b0f5a339e1
Proposal test uses special run() method to check exception throwing (#4062)
* proposal test uses special run() method to check exception throwing

* validate() removed from run()
2021-01-28 21:16:13 +03:00
Ilya Lavrenov 9cfe909e1e
Unused variables (#3963)
* Added -Wused-variable flag

* Fixes for clang compiler

* Removed wrong -Wno-error from protobuf compilation

* More fixes
2021-01-22 17:41:15 +03:00
Ilya Lavrenov 1044ed4352
Added export / import for Template and Hetero plugins (#3940)
* Added export / import for Template and Hetero plugins

* Added WA for Apple RTTI
2021-01-22 14:17:44 +03:00
Ilya Lavrenov 61ccde700f
Refactored VPU tests not to use old interfaces (#3888)
* Refactored VPU tests not to use old interfaces

* Added except of exceptions

* Commented failing part of HDDL tests
2021-01-21 15:05:12 +03:00
Ilya Lavrenov 036f574756
module library type for IE plugins, extensions (#3656)
* CMAKE: Added MODULE linker flags

* Fixed plugins.xml s

* Use module instead of shared library

* Fixes

* tab 2 spaces

* Renamed get_shared_library_name to ie_plugin_get_file_name
2020-12-23 18:25:42 +03:00