Commit Graph

773 Commits

Author SHA1 Message Date
Piotr Szmelczynski 94352874a5
Revise ceiling (#6124)
* update spec

* add RTTI macro

* clean backend test file

* create visitor test

* remove Ceiling cpu functional tests from skip_test_config

* fix skip_test_config conflict

* Add type_prop test for Ceiling.

* Fix failing ceiling type_prop tests.

* Replace unary_ops.cpp with single test op files.

* Enable integer tests.

Co-authored-by: Szymon Durawa <szymon.durawa@intel.com>
2021-06-18 05:50:02 +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
Edward Shogulin 8390f40788
[LPT] Empty shape on weights handling: cherry-pick to master (#6170)
* [LPT] empty shape on weights fix

* [LPT] SplitTransformation naming fix

* [LPT] tests

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
2021-06-17 12:36:25 +03:00
Elizaveta Lobanova 5c55d390e8
[GNA] Allow 2d reshape of the first diagonal layer (#6115) 2021-06-16 16:19:21 +03:00
Alexandra Sidorova b05977a536
[CPU][IE TESTS] Added more input shapes for Pooling tests (#6083) 2021-06-16 14:14:50 +03:00
Edward Shogulin 72cb75ffc7
[LPT] Reshape folding extending: cherry-pick to master (#6151)
* [LPT] Reshape folding extending

* [LPT] tests addition

* typo quick fix
2021-06-16 11:14:29 +03:00
Vladimir Paramuzov 2f81968a31
[IE CLDNN] Introduced new runtime API (#5417) 2021-06-16 09:27:16 +03:00
Marina Kolpakova ad852f78b4
[§] cleans snippets interface and adds subgraph tests (#6123) 2021-06-16 01:00:19 +03:00
Edward Shogulin a16af0d2ea
[LPT] FakeQuantize folding fix to support ConvolutionBackpropData with FQ on weights (#6160) 2021-06-15 16:59:10 +03:00
Alina Kladieva 67c93ec6fa
Return sporadic GPU test cases (cannot reproduce 54436) (#6127) 2021-06-15 13:47:06 +03:00
Szymon Durawa 772465da1e
Add output shape and output padding for Convolution Backprop SLTs. (#5576)
* Create output shape for Convoution Backprop SLTs.

* Add output_padding attribute to SLT scope.

* Introduce SLT for Serializaton.

* Introduce new test layer class ConvolutionBackpropLayerTest which contains output_padding attribute and output_shape input. Old one is deprecated, but cannot be removed due to kmb plugin dependency.

* Add ConvolutionBackpropDataLayerTest into TEST_P.

* ConvolutionBackpropDataLayerTest left as legacy class used by kmb_plugin.

* Remove redundant variables.

* Switch to new API for gpu SLTs.

* Remove legacy API.

* Introduce legacy API to match dependency for KMB and ARM plugins.

* Create test cases for output_padding attribute.

* Fixing smoke_Deconv tests.
2021-06-15 07:08:10 +03:00
Patryk Elszkowski 6deec50b0b
Reshape OP: add SLT for special `-1` value in new shape dimensions (#5648)
* add test for special `-1` value in new shape dimensions

* add ticket with next steps
2021-06-15 07:07:18 +03:00
Katarzyna Mitrus 8dff04df28
ShuffleChannels ng op and reference implementation revision (#5764)
* Unblock shuffle channels tests from ie test manifest

* Add more backend tests

* ShiffleChannel reference impl update

* Update attr visitor test

* Remove unused get_pre_shuffle_shape helper function

* Update class descriprion

* Add type prop shape tests

* Remove NGRAPH_SUPPRESS_DEPRECATED macro

* Add single layer tests

* Update layer tests

* Remove unused header

* Move implementation to cpp file
2021-06-15 07:04:06 +03:00
Bartek Szmelczynski 826638e523
Revise space_to_batch (#6034) 2021-06-14 12:18:22 +02:00
Mikhail Ryzhov 1a6392eb53
[GNA] Fixed export/import functionality (#5963)
* Rebase master

* [GNA] Fixed export/import functionality

* Extended import log

* Added logs

* Fixed importing issue for the old models

* Revert "Added logs"

This reverts commit 39a3882d56.

* Revert "Extended import log"

This reverts commit 59eb9d6fba.

* Reverted precision import

* Extended tests

* Enabled skipped tests

* Included gna2-common-api header

* Replaced included header

* Centos7 build fix
2021-06-09 20:39:05 +03:00
Ivan Tikhonov 3bedd051dc
processing sinks in hetero plugin, update single layer tests (#6090) 2021-06-09 19:03:38 +03:00
Elizaveta Lobanova f4ba0f28a9
[GNA] Convert Matmul with batch size > 8 to pointwise convolution (#5991)
* [GNA] Convert Matmul with batch size > 8 to pointwise convolution.
Support Eltwise split to more than 2 parts.
Fake Quantize support fixes.

* Put convolution split into a separate transformation

* Add separate transformations for cases with bias and fake quantize

* Rollback restriction for diagonal layer reshape
2021-06-09 18:15: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
Vladimir Paramuzov aa4a18dda1
[IE CLDNN] Updated GPU device config (#6040) 2021-06-09 09:02:25 +03:00
Ilya Lavrenov a36d6a0f06
Used setMeanImageForChannel (#6076) 2021-06-08 19:33:51 +03:00
Irina Efode a7a9364b41
[IE TESTS] Add local_cache arg to the subgraphDumper (#6063) 2021-06-08 14:23:45 +03:00
Alexandra Sidorova 9214fa72e2
[CPU] Fixed AvgPooling and FQ fusing (#5994) 2021-06-08 14:04:31 +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
Katarzyna Mitrus bc7f61be24
PRelu reference implementation and ReshapePRelu transformation alignment (#5915)
* Apply  ReshapePRelu transformation only to const slope input

* Remove xfail from onnx backend prelu_broadcast test

* Fix and add Prelu SLT

* Update PRelu mkldnn transformation to extend broadcast support

* Fix and update PRelu reference implementation

* ONNX Prelu tests

* Add prelu backend tests

* Update ie tests manifest

* Comments clean up

* Fix STL Fill leakyslope blob

* Code refactor

* Unify layer tests slope input values generation
2021-06-08 06:51:41 +03:00
Andrei Gorbachev 64d7a40ae4
[IE CLDNN] 54304 fix reduce ops (#5986) 2021-06-07 18:36:38 +03:00
Ivan Tikhonov c1608628d4
LowLatency v2 ngraph transformation (#5160)
* LowLatency 2.0: transformation and unit tests

* low latency 2.0: unit tests

* documentation and ngraph codestyle

* update CNN Interface of LowLatency transformation

* fix build on Windows

* fix build on Windows

* investigation of a failed build on Win OS

* ngraph codestyle

* fix build (werrors)

* New unit tests, refactoring

* update functional tests for Memory

* update LowLatency functional tests

* extend Memory tests to cover LowLatency v2 transformation

* clean up, code style

* fix unit tests

* update and fix unit tests, add feature to apply LLTv2 after LLTv1

* update docs, refactoring

* add several gna tests to skip config

* fix python api tests

* update python api, rename LowLatency_v2 to LowLatency2

* deprecate LowLatency v1

* Deprecate LowLatency v1 in IE

* fix wrong merge, codestyle

* resolve review comments

* fix python test

* update skip config

* apply online review notes, fix unit tests

* clean up, code style

* fix docs

* Use debug_messages instead of exceptions in llt v2

* fix unit tests

* Resolve review remarks
2021-06-07 15:13:41 +03:00
Polina Brzezinskaya e2ffcae852
[VPU][TEST] Turns back on CTCGreedyDecoderSeqLen tests (#6023)
* Turns back on CTCGreedyDecoderSeqLen layer tests with (1, 1, 1) size, since they were fixed by #5867
2021-06-07 10:58:41 +03:00
Egor Shulman b8b6b4d8b6
[CPU] Reduced number of tests for BatchToSpace and SpaceToBatch (#5385) 2021-06-04 15:59:44 +03:00
Maxim Vafin 90a93be071
Add transformations to optimize SR model (#5854)
* Add transformations to optimize SR model

* Add test for SplitSqueezeConcatFusion

* Add TransposeFuse tests

* Return TransposeOptimization renamed to TransposeToReshape

* Fix docstring

* Fix codestyle

* Fix build

* Fix GNA build

* Fix TransposeToReshape tests

* Fix test

* Temporarily disable cpu test

* Fix codestyle

* Fix test

* Fix test

* Enable SplitSqueezeConcatFusion

* Apply suggestions from code review

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* Apply review feedback

* Apply review feedback

* Update split_squeeze_concat_fusion.hpp

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-06-04 12:05:12 +03:00
Egor Duplensky fdf47d416b
[CPU] Enable GroupDeconvolution tests back (#5878) 2021-06-03 16:55:42 +03:00
Ilya Churaev d56cf51c81
Reshape should support reshape to zero shapes (#5828)
* Reshape should support reshape to zero shapes

* Fixed comments

* Fixed backward compatible check

* Fixed myriad tests

* Removed header

* Fixed myriad tests

* Disabled Myriad tests

* Fix tests

* Fixed evaluate

* Fixed comments

* FIxed tests

* Fixed tests

* Fixed code style

* Fixed Myriad tests

* Added more tests
2021-06-03 06:26:30 +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
Nadezhda Ageeva 487faf3f29
Fix 56171: Insert AffineFilter after split when padding is needed. Fix Basic_LSTM LLT test. (#5882) 2021-06-02 16:09:56 +03:00
Irina Efode bcdd915c9f
[IE TESTS] Add Conformance mode (test counters alignment between plugins) in (#5564) 2021-06-02 12:17:07 +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
Shoujiang Ma c9e83c2750
Update AUTO plugin capabilities implementation (#5757)
Signed-off-by: Shoujiang Ma <shoujiang.ma@intel.com>
2021-06-02 10:40:15 +03:00
Elizaveta Lobanova 4b486e6223
[GNA] Fix fq weights fusion and relu scale factors calculation (#5886)
* Fix FakeQuantize weights fusion when multiple operations were using the same const

* [GNA] Fix scale factor calculation for Relu if it has source and doesn't have destination statistics

Co-authored-by: Dmitrii Khurtin <dmitrii.khurtin@intel.com>
2021-06-02 10:11:11 +03:00
Vladislav Golubev 04b1f22cc3
[LPT] ConvolutionBackpropData Transformation fix (#5924)
* [LPT] ConvolutionBackpropData: handled incorrect dequantization on weights

* [LPT][TESTS] ConvolutionBackpropData: added test-cases with incorrect dequantization on weights
2021-06-01 17:05:36 +03:00
Yury Gaydaychuk 1264376173
[CPU] Extended preprocessing for CPU (#5750) 2021-06-01 17:03:24 +03:00
Maksim Kutakov 28c10b1727
[CPU] Fix mem leak in ParameterResultCustomBlobTest (#5933) 2021-06-01 16:43:03 +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
Maksim Kutakov 115aa143ef
[CPU] Fix for CoreThreadingTestsWithIterations tests (#5892) 2021-05-31 22:45:51 +03:00
Maksim Kutakov 7fb9bac24a
[CPU] Extend Concat node logic to avoid fallback on slow ref implementation. (#4129) 2021-05-31 18:49:57 +03:00
Elizaveta Lobanova 090dde93b8
[GNA] Replace int32_t type by size_t for levels in GNA quantization classes (#5870) 2021-05-31 12:21:12 +03:00
Irina Efode 5e92154422
[IE TESTS] Enable DLB suite (#5717)
* [IE TESTS] Enable DLB suite

* test

* test

* Skip config
2021-05-28 18:09:12 +03:00
Roman Lyamin c8a5044664
[IE CLDNN] Add Select int32/int16 input support (#5877) 2021-05-28 18:00:51 +03:00
Chenhu Wang d2003095dc
[CPU] MVN_accuracy_fix_on_avx512 (#5787) 2021-05-28 17:56:04 +03:00
Maksim Kutakov ad0e0c9f7c
[CPU] Added support for network inputs and outputs with the same name. (#5000) 2021-05-28 16:45:44 +03:00
Vladimir Zinoviev 8ff0ab0488
Tests improvement (#5704)
* [LPT] Test: concat with convolution neighbor and convolution after

* [LPT] elementwise fuse to FakeQuantize

* [LPT] plugin test build fix

Co-authored-by: Edward Shogulin <edward.shogulin@intel.com>
2021-05-28 14:27:45 +03:00