Commit Graph

18 Commits

Author SHA1 Message Date
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
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
Mikhail Nosov e29169db47
Caching: pass global CACHE_DIR setting to plugin (#5893)
* Caching: pass global CACHE_DIR setting to plugin

This can be helpful for GPU - it doesn't support Import/Export but can
significantly speed up load time when CACHE_DIR is set for device only

* Ignore exception in 'DeviceSupportsConfigKey' if plugin doesn't support GetMetric at all
2021-05-31 19:09:07 +03:00
Anton Pankratv d899606493
Merged plugin and exec network internal implementation (#4923)
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2021-05-27 13:33:09 +03:00
Ilya Lavrenov a7d95bbfa3
Added SetExeNetworkInfo to Plugin API level (#5715) 2021-05-20 14:28:01 +03:00
Mikhail Nosov fd3338b41a
Multi plugin - override loading network from file (#5677)
* Multi plugin - override loading network from file

When caching is enabled, MULTI plugin will check all devices
- For devices with caching supported - call LoadNetwork(modelPath, ...)
- For others - ReadNetwork once and then LoadNetwork(cnnNetwork) for each device

Caching unit test is added for both cases

Additional helper methods:
- ICore::ToExecutableNetwork - converts internal ExeNetwork to ExecutableNetwork
- ICore::DeviceSupportsImportExport - checks if device supports import and export functionality. Used by Hetero and Multi

* Updated according to review comments

* fixed sporadic failure of 'multi-device' test cases

Root cause:
Currently only one 'ExecutableNetwork' object is created for each LoadNetwork
For Multi-testing several threads could call simultaneously setNetworkInputs/Outputs/SetPointerToPlugin
It caused race condition and invalid data structures

* Fix build issues after rebase

* Multi: Set network inputs/outputs/pointerToPlugin for load-from-file case

Overloaded function doesn't call these methods, thus multi executable network was unusable

Added caching test verifying that inputs/outputs are copied now from first loaded device network
2021-05-20 12:37:44 +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 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
Mikhail Nosov 8a3d826d69
Add VerifyAndClearExpectations for mocked object stored as shared_ptr (#5541)
It is a known internal issue in gtest when holding a shared_ptr to mocked object, which sometimes reports about memory leak
It is recommended to use Mock::VerifyAndClearExpectations at the end of each test when mock object is not needed anymore

After adding this, issue with incorrect TestThrowOnImport expectations is observed
2021-05-07 11:47:57 +03:00
Mikhail Nosov 6581127114
[Caching] Don't propagate import error on plugin side (#5390)
* HotFix for ConvertPrecision tests

* [Caching] Don't propagate import error on plugin side

Instead, invalid cache will be silently removed and network will be loaded without cache

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2021-04-27 06:54:49 +03:00
Mikhail Nosov e53249ddf2
Disable time measurement (#5376)
On CI machines there is a chance to run various test executables at the same time.
When intensive CPU load occurs, 'sleeps' can last much longer than expected even in very pessimistic scenario
2021-04-26 10:28:26 +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
Anton Pankratv b20d9b725c
Used internal exec network impl (#4922) 2021-04-08 12:29:41 +03:00
Mikhail Nosov 4021cb7519
Caching support of multi-device scenario (#5040)
* Caching support of multi-device scenario

- IE_CORE: introduce CacheGuard which can create locks for specific cache identified by 'hash'
- Added functional tests for it

Fixes of Thread Sanitizer failures:
- ngraph::Serialize - m_ref[i] can create new element, casted to 'const' to avoid this
- ngraph::get_opset oprations: reworked to use std::call_once instead of double bool check

* Added docs for ie_cache_guard.hpp

* Fix Debian 9 compilation issue

* Fix build for CentOS 6

Added assert to verify that table of locked hashes is empty on destruction

* Fixed review comments
2021-04-01 14:42:48 +03:00
Mikhail Nosov 65bad6c3a8
[Hetero plugin] Model caching support (#4977)
* [Hetero plugin] Model caching support

- Enable IMPORT_EXPORT_SUPPORT metric
- Introduce internal FORCE_DISABLE_CACHE flag to avoid caching of subnetworks
- Added test for hetero with plugins which don't support caching
- Added test for hetero with plugins supported different cache architecture

* Hetero plugin - support DEVICE_ARCHITECTURE

Test setup:
mock.1 - mock.9 returns "one" for DEVICE_ARCHITECTURE
mock.10 - mock.99 returns "two"

Test:
Load "HETERO:mock.1,mock.51".
Load "HETERO:mock.2,mock.52" - cache shall be reused

* Fixed review comments

Covered use case case
ie.SetConfig({{"TARGET_FALLBACK", "CPU"}}, "HETERO");
ie.LoadNetwork(network, "HETERO");

* Fixed more comments and failed tests

Don't propagate FORCE_DISABLE_CACHE to plugins as they can throw exception
Fixed case with set TARGET_FALLBACK from core with different architectures of one plugin

* Fix unit tests

Add 'FORCE_DISABLE_CACHE' config key only for LoadExeNetwork
It is not needed to have in in QueryNetwork and other places

* Attempt to fix failed func test on Windows
2021-03-27 22:39:10 +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
Mikhail Nosov 7f9daadc08
Model caching support - Core part (#4661)
* Model caching support - Core part

Introducing model caching support
Use core.SetConfig({{CONFIG_KEY(CACHE_DIR), <dir>}}); to enable caching of models

OpenVINO will try to create caching folder if it doesn't exist, but it is recommended for client to create caching folder with necessary permissions before enabling cache in config

For caching, plugins shall support import/export functionality
Plugin requirements:
- Add METRIC_KEY(IMPORT_EXPORT_SUPPORT) in SUPPORTED_METRICS to support caching
If plugin has different device architectures with different caches, i.e.
For "GNA.0" - one cache, for "GNA.10" - another cache
In this case plugin shall support DEVICE_ARCHITECTURE metric and return different strings for different DEVICE_ID's

Added functional tests

* Fix CentOS build issues

* Few updates according to code review

* Revert unnecessary changes for Import/Export core implementation

These changes affect old behavior and may be undesired
For caching support these is no need to change anything in this area
If needed, such removal of 'Magic' usage can be done under separate task in future

* More tests:
1) Verify that Imported data from stream is the same as was exported
2) Verify that cache is not loaded when config in LoadNetwork is changed
3) Verify that if CNN Network is changed between ReadNetwork and LoadNetwork - cache is not loaded

* Update of NetworkCompilationContext

Put back functionality of calculating hash based on runtime information, weights
Implemented OstreamHashWrapper to avoid serialization to buffer

* Correction of CACHE_DIR key description

* Unit tests for compilation_context

Changes:
1) Improved handling of OstreamHashAdapter
2) Improved runtime info serialization (not just PrimitivesPriority and affinity)
3) Removed redundant weights hash calculation

* Fix GCC 4.8 build issues

* Compilation context updates
1) Use hash of sum of serialized data to get hash of network. It is more efficient comparing to weights sum calculation
2) CalculateFileInfo - convert path to absolute ("./test.blob" and "test.blob" shall give same hash)

* Hash - added more rt_info attributes + tests

- PrimitivesPriority
- FusedNames
- Dequantization

* Moved "get_absolute_path" macro to file_utils.h

* Make 'absoluteFilePath' a library API, not macro

* One more unit test for fileName hashing

* Fix compilation error after merge with latest master

* Allow tests to be executed in parallel (stress mode)

* More minor updates for stress testing

Now it allows to execute tests with '--repeat=100' option where one test is executed in multiple processes simultaneously

Example:
./gtest-parallel <openvino_dir>/bin/intel64/Debug/ieFuncTests --gtest_filter=CachingTest* --repeat=10

* Use absolute model file path for calculating blob name

* Added 'createDirectoryRecursive' API to plugin_api/file_utils
2021-03-16 14:13:45 +03:00