* [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>
* Corrected tests to match CVS-53713
* Fixed tests configs
* Skip tests on GPU
* Commented condition inside main SetBlob because of MYRIAD
* Adopted tests
* batch support for interpolate
* hash update
* compilation errors solved
* changes in tests, so not to break other plugins
* changes in tests, so not to break other plugins
* Revert "changes in tests, so not to break other plugins"
This reverts commit 67e5c1e4ddba4f0cc858eb1293e50ce9d9ae0227.
* Revert "changes in tests, so not to break other plugins"
This reverts commit f6a537d2236f0b64f0ff028627af9e0e388a2d23.
* review corrections
* Firmware update
* Store weights range in meta info instead of cloning whole constant
* Add command line option for constants size serialization threshold
* Update IR Runner to handle OP meta information
* Fix interpolate type_prop tests
* Skip new failures in SLT
* Fix models count
* Add dynamism elimination option.
* TopK shape propagation changed
* Fix type_prop tests for TopK
* [IE][VPU] Fix batch detection/removal logic in MYX plugin
* Some changes & test
* The condition for skipping the CachingSupportCase MyX test has been removed
* Added PreprocessConversionTest tests
* Disabled tests on GPU: CVS-51764
* Disabled some tests on VPU and TEMPLATE
* Support for input layout conversions in TEMPLATE plugin
* Enabling cache support for Myriad plugin
Remaining issues:
1) 49309 - support DEVICE_ARCHITECTURE
2) Fix 51472 for import/export issue with batch size > 1
* Added 'options' to DeviceArchitecture and more clarifications
* [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
* 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
* Fix negative axis processing for StaticShapeTopK
* Preserve output names in MergeSubsequentDSROperations
* Do validate_and_infer_types every time it's called in StaticShape* operations. It's needed to infer the correct output type in case it was changed from the last call moment (e.g. the ConvertPrecision pass have been called)
* Implements test for CTCGreedyDecoderSeqLen layer in Myriad plugin.
* Changes the way CTCSeqLen operation is generated. Moved random generation of SeqLen input from makeCTC function to the test. Made test to clamp test's parameters to be in valid range.
* Adding of partial support of MVN-6 operation to VPU Plugin (support restricted by MVN-1 interface)
* Disabling of MVN-6 decomposition for VPU Plugin
* Enabling of test cases for this operation
* Disabling of deprecated MVN tests while investigation is go on
* Reference implementation for Proposal, enable CPU SLT
* code style fix
* add type prop test for invalid anchor count
* add unit test
* fix shapes in attribute test
* temp workaround- disable maring end of boxes list
* Disable CPU smoke test- spec misalignment
* code style fixes
* add some details to the specification
* disable myriadx proposal slt
* review changes, using usigned int and size_t
* improve proposal op shape inference to cover dynamic too, add unit test coverage
* remove unused variable in test body
* remove batch size in tests where its not used
* add post nms topn initialization in tests where it was missing
* review comments
* style fix
* style fix 2
* add tests, remove unused variables, change shape inference checks
* style fix
* add input tensors type checks and test coverage
* align input type in attribute and ngraphreader tests to match specification
* fix wrong dimension in error message
* proposalv4 ref impl
* enable single layer and unit tests for proposalv4 ref impl
* align output termination with cpu, enable cpu slt
* custom slt compares to detect less-than-predicted number of boxes
* custom slt compares to detect less-than-predicted number of boxes
* Clarify output termination in spec
* review comments
* smaller input data for unit tests
* add check for batch_dim being static
* disable gpu slt for proposal
* test data style fix
* test data style fix 2
* add type section to specification
* shape inference improvement
* multiply expected 1st dim in tests by post_nms_topn
* add checks and testcases for dynamic ranks
* indentation, review comments
* reduce code redundancy in ref implementation
* remove comment
* Fix typo in proposal1 spec
* Fix typo in proposal4 spec
* fix initialization bug of spatial_scale in tests (affected input generating)
* fix input generating for bilinear ROI Pooling
* correct parameters for myriad tests:
* myriad plugin does not support batch for this layer;
* decrease threshold since myriad uses fp16 calculations
* Support DTS for GatherElements
* Extract GatherBase to a common part
* Introduce tests on inference
* Introduce tests on function comparing
* Disable failing tests
* Update firmware
* Add the test case from the network
* Disable fp32 case, because in this case the network has output Convert which receives non-inner stride in its input which is not supported now.
* Support FP16 comparator.
* Enable CoreThreadingTestsWithIterations tests for GNA
Sync rest of GNA Lib API,
Sync Config for MT tests
Change models in CoreThreadingTestsWithIterations to be compat with GNA
* Use parameter for model set selection
* Fix style
* Disable HETERO CoreThreadingTestsWithIterations tests and create issue 45658
* Fixed tests compilation for Android ARM
* Small fixes
* Fixed issues CVS-44775, CVS-34206, CVS-34349
* Disabled KSO tests for Template
* Eliminated invalid subgraphs
* Enabled KSO QueryNetwork tests for Template
* Fixed other plugins as well
* Used NodeTypeInfo instead of std::string
Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
* zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these
* Optimized Infer Request Scheduling
* remoteblob checks in the conventional SetBlob
* correctly (with status) reporting NOT_IMPLEMENTED
* SetBlob to accomodate for the RemoteBobs
* Tests for remote blobs support via MULTI: creating the shared_test in case the other (closed source) plugins would want to use that (in the private shared_tests instantiations).
Also instantiating the remote blobs tests for the some basic combinations to test the MULTI supports them
* macos compilation (and general plugin platform support) fix
* shuffled files, so that the MULTI tests are now part of the ieFuncTests (and need no separate target). Also brushed the macro that handales the NOT_IMPLEMENTED as bit
* further shuffled files, so that the initial MULTI tests are now part of the IE tests, yet specific instances do need separate targets
* Fixed misprint
* Brushing the code and comments a bit
* further brushing of the ScheduleToWorkerRequest: moving the task execution directly into the loop over devices (avoids pointers and 'else' clause)
* 1) zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these
2) Initial MULTI section in the opt guide (primarily to document a tip on helping the MULTI to keep the zero-copy path)
* [MULTI] remote context support and associated scheduling (respecting the remote data affinity)
* fix CentOS (old) gcc issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81880
since the intriduced therad_local string is template the bug manifests itself (and the string is not allocated/initialized).
the QA is to wrap the std::string into the function
* further fix for the old gcc versions issue, now with non-trivial thread_local destruction sefault: switching from the std::string to the plain const char*
* additional tests for the MULTI and remote blobs (no remote context and multi GPUs cases)
* fix for the tests (that now can check for more specific NotImplemented exeption).
Alos couple of line endings
* [VPU] Fix dynamic networks import
* [IE][GNA][TESTS] Move ImportExport tests from GNA to shared part
* [VPU][Tests] Add ExportImport test for dynamic network
* [VPU] Review fixes
* [VPU][Tests] Review and test fixes
* [VPU][Tests] Move TEST_P to shared part
* ROIPooling: Specification and op class alignment
* ROIPooling: Add check to input tensor type to be aligned with spec
* ROIPooling: Corrected spec description for input tensor shape and box coordinates
* ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int
* Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int"
This reverts commit d49cfa8e53.
* ROIPooling: Further specification changes
* ROIPooling: Rename enum class ROIPoolingMethod methods
* Fix style
* ROIPooling: Draft reference implementation
* ROIPooling: Adjust feature map element type to float for attribute unit test
* ROIPooling: Add single layer test class
* ROIPooling: Corrected output index to iterate through output tensor elements
* ROIPooling: Added validation checks for input types in op constructor
* ROIPooling: Add unit tests
* ROIPooling: Attributes unit test changed to align with spec
* ROIPooling: Add check for batch id in reference implementation and unit test
* ROIPooling: Refactor single layer test class
* ROIPooling: Add test for invalid pooling method
* ROIPooling: Clean up unnecessary function declaration
* ROIPooling: Remove duplicated default ROIPooling method in op constructors
* ROIPooling: Add Infer method to generate suitable ROI data
* ROIPooling: CPU single layer test instantiation for max method
* ROIPooling: Remove enum class ROIPoolingMethod
* Revert "ROIPooling: Clean up unnecessary function declaration"
This reverts commit 074b540dea.
* ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod
* ROIPooling: Add attribute checks in op constructor to align with spec and unit tests
* Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t
* ROIPooling: Fix for output index calculation to loop through all ROIs
* ROIPooling: Add unit test for bilinear interpolation method
* ROIPooling: Add CPU single layer test instantiation for bilinear method
* ROIPooling: Clean up unnecessary enum class for pooling method
* ROIPooling: Add myriad single layer test instantiation
* ROIPooling: Add F16 precision single layer tests for CPU plugin
* ROIPooling: Add node validation check for string method attribute in constructor and unit tests
* ROIPooling: Spec changes to improve understanding of the operation
* ROIPooling: Fix for bilinear method when pooled size is 1x1
* ROIPooling: Add unit test for bilinear method and pooled size 1x1
* ROIPooling: Fix to broken format of specifications
* ROIPooling: Disable Myriad single layer tests
* ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests
* ROIPooling: Code clean up
* ROIPooling: Address review comments
* ROIPooling: Changed location for makeROIPooling helper method
Co-authored-by: Kirill Molchanov <kirill.molchanov@intel.com>
* Added pre-proc test
* Fixed mean image tests
* Disabled scale tests for CPU
* Disabled test for Myriad
* Disable tests for GPU
* Added reverse input channels test
* Disabled test for GPU
* Disable Myriad tests
* Added links to tickets
* [IE TESTS][IE CMAKE] Add cmake option for configuration to skip tests
* [IE TESTS] Remove extra dependency from IE tests shared lib
* Revert to add flag