Commit Graph

125 Commits

Author SHA1 Message Date
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 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
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
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
Ilya Lavrenov eff9f00320
Refactored ie_plugin_config.hpp (#5899) 2021-06-01 16:31:29 +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
Eunsoo Sheen d05c3c63b5
[IE CLDNN] Add an initial loop primitive for fixed length sequence (#4954) 2021-05-28 11:55:48 +03:00
Elizaveta Lobanova f450f61bc3
[GNA] Avoid integers overflow during pwl calculation for FakeQuantize (#5841)
* [GNA] Avoid integers overflow during pwl calculation for FakeQuantize

* The similar fix for Relu
2021-05-27 16:49:40 +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
Krzysztof Bruniecki df9525be38
[GNA] Add negative CNN2D tests (#5741)
* invalid kernel
  * invalid input
  * invalid padding
  * invalid stride
  * invalid dilation
2021-05-26 12:40:31 +03:00
Ivan Tikhonov 0c30ccc120
Single layer tests for Assign/ReadValue ops (#5735)
* add single layer tests for Assign/ReadValue ops

* fix windows build, revert debug changes
2021-05-24 18:58:48 +03:00
Elizaveta Lobanova ee368fb828
[GNA] Fixed errors about unsupported 1d tensors (#5667) 2021-05-21 18:55:59 +03:00
Elizaveta Lobanova 68b94a7c9f
[GNA] Support of Matmul with const as the first input and other fixes for softmax and layer norm patterns. (#5623)
* Swap inputs pass

* [GNA] Handle case Gemm layer

* [GNA] Convert Matmul to FC

* VS tests

* Move to common optimization

* Gemm execution such as FC

* Test calc scale_factor

* Some changes

* Working version

* [GNA] Insert transpose between convolution/pooling and reshape.
Insert copy layers after concat inputs with multiple connections to the concat.
Accept networks with input connected to layers with different orientations if one of input dimensions is 1.
Fix scale factor calculation for Eltwise layer.
Fixes for Gemm quantization.

* Insert transpose after Reshape and  before Matmul

* Fix concat input alignment when it's the network input

* Comments applying

Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2021-05-19 14:44:00 +03:00
Krzysztof Bruniecki 0face0e7cb
Use compile target in export tests for SUE (#5594) 2021-05-18 14:32:48 +03:00
Krzysztof Bruniecki 606d0f363a
[GNA] Fix concat scale factors calculation (#5454)
* [GNA] Fix concat scale factors calculation

* Add tests with Input | Constant -> Strided Slices -> Concat

  Topology:
       Constant                Parameter
        |   |                    |   |
    +---+   +---+            +---+   +---+
    |           |            |           |
  SS_1c  ...  SS_Nc        SS_1p  ...  SS_Np
    |           |            |           |
    |           +----+  +----+           |
    |                |  |                |
    +-------------+  |  |  +-------------+
                   \ |  | /
                    Concat
  Legend:
      SS == Strided Slice

* Apply review

Co-authored-by: Elizaveta Lobanova <elizaveta.lobanova@intel.com>
2021-05-17 11:59:34 +03:00
Krzysztof Bruniecki 05b62258c7
[GNA] Improve CNN2D kernels/weights quantization (#5370)
* Introduce heuristic for weight reducer
     * handle kernels 3x3 and 7x1 to avoid saturation
     * enable tests
     * issue 54140
2021-05-13 16:31:23 +03:00
Andrey Dmitriev ffb3a4d32b
[GNA] Run caching test (#5477) 2021-05-05 09:55:27 +03:00
Elizaveta Lobanova 22e4566faa
[GNA] Remove extra reshape before maxpool. Fix activation and maxpool reordering. (#5404)
Fix convolution input transposition for Kaldi models with FakeQuantise layers.
Fix floating point error in gnaFuncTests with debug logs.
2021-04-30 15:42:27 +03:00
Krzysztof Bruniecki 2fb6b46e5a
[GNA] Add limiatations for CNN2D fused layer (#5334)
* Add limiatations for input HWC kernel HW and output C

* Fix single layer tests

* Add limitations for pooling 2d, adjust tests to new limitations

* Disable input padding

* Apply review

* Apply review 2

* Fix undefined type on legacy API

* Fix centos

* fix cpplint

* Simplify
2021-04-29 10:49:00 +03:00
Elizaveta Lobanova 78cf72819b
[GNA] fix pwl for Sigmoid quantised with signed range (#5271) 2021-04-22 13:27:21 +03:00
Szymon Irzabek a359fe9f37
[GNA] Add basic low precision support for more layer types (#5138)
* [GNA] Add basic low precision support for more layer types, add simple test

* [GNA] Fix test

* [GNA] Make divisor const, add more clarity to some conditions
2021-04-20 10:40:00 +03:00
Elizaveta Lobanova f7cf92e52a
[GNA] fix TensorIterator unrolling with one iteration (#5217) 2021-04-14 18:55:52 +03:00
Mikhail Nosov 1662ee0647
[GNA] Enable IMPORT_EXPORT_SUPPORT metric (#4889)
* Proper cleanup of cache_dir on start/end tests

Also add ability to skip the test depending on plugins 'skip_test_config'

* [GNA] Enable IMPORT_EXPORT_SUPPORT metric

Some tests were skipped, appropriate tickets were raised
2021-04-12 16:46:42 +03:00
Elizaveta Lobanova 69be1f1c02
[GNA] Prohibit 2D data reshaping for diagonal layer if it's the first functional layer in network (#5097) 2021-04-12 11:23:29 +03:00
Szymon Irzabek 2486c5b90a
GNA low precision (#4109)
* [GNA] Add low precision support for some layers (affine, eltwise, ReLU, sigmoid)

* [GNA] Fix convolution and scaleshift regression fail

* [GNA] Fix const scale factor calc

* [GNA] Fix extra whitespace

* [GNA] Eltwise padding and low precision primitive creation support

* [GNA] Changes after review

* [GNA] Remove INPUT_PRECISION GNA flag

Remove INPUT_PRECISION flag, all references to it
and tests using it. Other minor stylistic changes and cleanup.
2021-04-07 14:28:24 +03:00
Elizaveta Lobanova 27268f008e
[GNA] Fix transformation from NCHW to NHWC for 4d concat (#4852)
Add additional checks for transformation from NCHW to NHWC
2021-04-01 18:38:30 +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
Krzysztof Bruniecki 985adb8223
Sync model loading from different threads using single Core (#4842)
- Enable tests
2021-03-24 13:44:23 +03:00
Szymon Irzabek 3672fb9817
Enable CNN2D tests for GNA library 2.1 (#3917)
* [GNA] Enable CNN2D tests for GNA library 2.1

* [GNA] Fix test skipping decision
2021-03-23 14:52:45 +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
Mikhail Nosov 9df8502bc8
Fix issue with GNA Import/Export. (#4563)
* Fix issue with GNA Import/Export.

Application may create ostream and write some app-specific header to beginning of stream.
GNA plug-in shall not 'seekg' to beginning of stream where app-specific content is located.
Instead it shall seek to the original position of stream

Functional test is also updated to cover this case

* Updated according to review comments

- Check return code right after 'istream::tellg'
- Added 'applicationHeader' as parameter to base ImportExport tests

* Error check for startPos + unit test

* Suppress deprecated warnings like in other GNA tests
2021-03-16 12:57:13 +03:00
Krzysztof Bruniecki ecee373220
Gna cnn2d with pooling support (#4574)
* [GNA] Support Pooling 2D

  Refactor Pooling
  Remove unused sum pooling
  Skip ReorderPoolActivation pass when 2D pooling detected
  Enable fusing of Pool2D with other components into GNA Operation

* Support GNA_SW_FP32 mode for Pooling 2D with tests

* Apply review

typo

* Apply review

Restore indentation
2021-03-15 16:16:45 +03:00
Elizaveta Lobanova 39ae56d71f
[GNA] Move weights transposition from NCHW to NHWC to GNA pass after FQ passes (#4614) 2021-03-12 12:12:41 +03:00
Elizaveta Lobanova fd311e60f5
[GNA] Map 2d convolution to 1d if kernel width/height is equal to input width/height (#4471)
Fix transposition info handling for a crop layer
Throw exception for 1d convolution padding
2021-03-11 15:22:33 +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
Elizaveta Lobanova 96b7b9441e
[GNA] Fix issues with compilation and quantization of input-split-concat pattern (#4489) 2021-03-02 14:59:55 +03:00
Maxim Andronov b224e688fe
[IE TESTS] Update ConstantResultSubgraphTest (#4120) 2021-03-01 12:16:06 +03:00
Andrey Dmitriev b2b350b851
[GNA] Tests for clamp layer (#4363)
* [GNA] Tests for clamp layer

* [GNA] Fix comments
2021-03-01 11:26:02 +03:00
Krzysztof Bruniecki 304c31d10e
[GNA] Enable Zero Padding (#4252)
* [GNA] Enable Zero Padding

   Fix CNN2D stride order
   Draft pooling

* Implement CNN2D FP32 mode in GNAPlugin

* Move padding flag to Policy

* Remove inactive output rotation code from CNN2D graph compiler routine (review)

* Add ConvReluSequence tests to gnaFuncTest as DISABLED
2021-02-24 19:03:40 +03:00
Elizaveta Lobanova 7d605e58e5
[GNA] Fix transposition to NHWC for models with splits and concats (#4419) 2021-02-20 18:16:11 +03:00
Piotr Rozen 3f6dbb8a00
[GNA] 4D StridedSlice, Clamp, InsertIdentityLayerPass, SubstituteScaleShiftBroadCastPass fixes (#4061)
* fixed: StrideSlice/Crop was broken when crop axis != dim.size() - 1 & added support for tensor dim > 2
fixed: clamp had hard coded upper & lower boundary to -50/50
fixed: InsertIdentityLayerPass was adding not necessary identities that was leading to exception when 2 identities was added to convolution output
fixed: SubstituteScaleShiftBroadCastPass caused invalid input tensor dimension overwrite - instead of overwrite currently reshape is injected

* updated copyright header dates

* updated copyright date

* fixed braces not at the end of line

* fixed braces in if else sequence

* shortened line length

* fixed issues reported in review

* fixed test - model in test assumed clamped range <-5,5> however code had hard coded value <-50,50>, which test assumed as correct result

* fixed smoke_MemoryEltwiseReshapeConcatTest/MemoryEltwiseReshapeConcatTest

* [GNA] Added test for crop 4d

Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2021-02-12 12:27:00 +03:00
Ilya Lavrenov 5fe882e550
CVS-48367: Enable HoldersTestOnImportedNetwork test on GNA (#4230) 2021-02-12 11:45:51 +03:00
Elizaveta Lobanova 42c8d1c45f
[GNA] Support of constant trivial networks (#4169) 2021-02-08 15:25:46 +03:00
Elizaveta Lobanova 4393525313
[GNA] 1D convolution support for native NCHW models (#4067) 2021-02-05 14:55:11 +03:00
Ilya Churaev 2ebae7cf30
Introduce the Broker API to map original framework names to OV (#3800)
* Added tests

* Fixed tests

* Added tests to check addOutput method

* Added support of port names in the IR

* Update copyrights

* Deprecate tensor name

* Fixed comments

* Enabled functional tests for GPU, GNA and Myriad

* Fixed get_tensor().get_names()

* Added unit test to check tensor names

* Fixed code style

* Skip add output test for GNA

* Added serialization support

* Added PythonAPI

* Fixed tests

* Fixed tests

* Fixed typo

* Try to disable GNA test

* Fixed tests

* Removed unused variables

* Fixed tests

* Update documentation

* Fixed comment
2021-01-29 06:28:31 +03:00
Svetlana Dolinina 05d97fa24a
Fixed issue with run stateful network with several infer requests on MKLDNNPlugin (#3711) 2021-01-21 15:01:03 +03:00
Krzysztof Bruniecki 00c57a3bdf
Enable CNN2D tests for GNa Lib 2.1.0.1048 (#3529)
Enable tests including rectangular kernel and multiple kernels
  Pad filters to 16B
  Fix style space after if before ( needed
  Fix PRETTY_FUNCTION double def
  Fix canMatchWith1AsyncThread
  Fix ifdefs for gna 2.0
  Add and fix mock
  Simplify and fix condition for Rotate features
  Refine commnets in GNA CONV tests file
  Apply review, Refactor ConvolutionPrimitive
  Refine CNN enforce legacy
  Add debug print
  Move debug dump definitions
  Add new metric for GNA library version
  Add coments on FP32
2021-01-15 16:56:37 +03:00
Elizaveta Lobanova 84c06e0856
[GNA] Fixing issues for convolution single-layer tests (#3586) 2021-01-14 11:59:31 +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