Files
openvino/inference-engine/tests
Evgeny Lazarev 99f94ca09c Adding v7::Gelu operation (#4497)
* Added support for Gelu-6 to the MO

* Adding Gelu-6 to ngraph and python API + some tests

* Fixed typo in the Gelu approximation mode

* Fixed Gelu-6 reference implementation for Tanh mode

* Added transformation to downgrade v6::Gelu to v2::Gelu

* Added specification for the Gelu-6

* Code style fixes

* The Gelu-6 operation specification update

* Fixed compilation issue in reference implementation for Gelu

* Fix compilation issues for some OSs

* Code style fix

* One more cpplint issue fix

* Fixed Gelu6 reference implementation compilation on Windows.

* Code style fix

* Fixed various ngraph unit tests

* Code style check

* Reverted Gelu-2 to be fused op

* Fixed Gelu6 downgrade transformation

* Added unit test for Gelu6Downgrade transformation

* Update copyright year

* Updated copyright year

* Replaced tab characters with 4 spaces in IR reader tests

* Code style fixes

* Added default value for GeluApproximation mode for Gelu-6 op

* Fixed code style for Gelu-6

* Changed order of parameters for the Gelu evaluate to potentially avoid backward compatibility issues with ARM plugin

* Fixed code style

* Introduced opset7. Moved Gelu6 to opset7

* Fixed non-updated transformation

* Fixed opset version in ngraph Python API for Gelu operation

* Fixed typo in the opset number in the documentation

* Reverted some changes related to Gelu6

* Updated MO to produce Gelu7

* Updated unit tests for Gelu

* Updated Gelu7 specification

* Changed gelu reference implementation. Added opset7 to Python packages

* Updated Python API tests for Gelu operation

* Code style fix

* Marked get_approximation_mode function as const

* Added missing "const" qualifier

* Fixed code style issues in tests

* Added extractor for MxNet operation Gelu

* Spelling issues fix

* Updated MxNet supported symbols

* Added NGRAPH_OP_SCOPE for Gelu7 validate_and_infer_types

* Fixed a typo in the comment
2021-03-09 22:45:45 +03:00
..
2021-03-05 12:08:01 +03:00
2020-04-13 21:17:23 +03:00

Inference Engine Test Infrastructure

This is OpenVINO Inference Engine testing framework. OpenVINO Inference Engine test system contains:

  • Unit tests
    This test type is used for detailed testing of each software instance (including internal classes with their methods) within the tested modules (Inference Engine and Plugins). There are following rules which are required for Unit Tests development:

    • All unit tests are separated into different executables per each tested module.

    • Unit test folder for a particular module should replicate SRC folder layout of the corresponding tested module to allow further developers get better understanding which part of software is already covered by unit tests and where to add new tests if needed.

      Example: We have network_serializer.h and network_serializer.cpp files within the src folder of the tested Inference Engine module. Then, new network_serializer_test.cpp file should be created within the root of the Unit Test folder for this module. This test file should cover all the classes and methods from the original files.

      Example: We have ie_reshaper.cpp within the src/shape_infer subfolder of the tested module. In this case new shape_infer subfolder should be created within the the root of the Unit Test folder for this module. And new ie_reshaper_test.cpp file should be created within this newly created subfolder. This test file should cover all the classes and methods from the original file.

    • Each Unit Test should cover the only target classes and methods. If needed, all external interface components should be mocked. There are common mock objects provided within the common Unit Test Utilities to stub the general Inference Engine API classes.

      Example: We have cnn_network_impl.hpp and cnn_network_impl.cpp files within the src folder of the tested module. In this case, new cnn_network_impl_test.cpp file should be created and it should contain tests on CNNNetworkImpl class only.

    • It's not prohibited to have several test files for the same file from the tested module.

    • It's not prohibited to create a separate test file for a specific classes or functions (not for the whole file).

  • Functional tests
    This test type is used to verify public Inference Engine API. There are following types of functional tests:

    • inference_engine_tests are plugin-independent tests. Used to verify Inference Engine API methods which don't involve any plugin runtime. E.g. network_reader, network_serializer, precision tests.
    • plugin_tests are plugin-dependent tests. These tests require plugin runtime to be executed during testing. E.g. any tests using ExecutableNetwork, InferRequest API can only be implemented within this test group.

    Example: Any new test on creating of a CNNNetwork object and checking of its output info should be included to to the Inference Engine Functional tests suite. But any new test containing reading of a network and loading it to a specified plugin is always the plugin test.

    There are following rules which are required for Functional Tests development:

    • All Functional tests are separated into different executables for the Inference Engine and each plugin.

    • Pre-converted IR files must not be used within the new Functional Tests. Tested models should be generated during the tests execution. The main method to generate a required model is building of the required NGraph function and creating of a CNNNetwork using it. If a required layer is not covered by Ngraph it's allowed to build IR file using xml_net_builder utility (please refer to the ir_net.hpp file). IR XML files hardcoded as strings within the test code should not be used.

    • All the plugin test cases are parametrized with (at least) the device name and included to the common funcSharedTests static library. This library is linked to the Plugin Test binaries. And all the plugin developers just add required test instantiations based on the linked test definitions to own test binary. It should be done to make all the shared test cases always visible and available to instantiate by other plugins.

      Note

      : Any new plugin test case should be added to the common test definitions library (funcSharedTests) within the DLDT repository first. And then this test case can be instantiated with the required parameters inside own plugin's test binary which links this shared tests library.

      Note

      : funcSharedTests library is added to the developer package and available for closed source development.

    • All the inference engine functional test cases are defined and instantiated within the single test binary. These test cases are not implemented as a separate library and not available for instantiations outside this binary.

  • Inference Engine tests utilities
    The set of utilities which are used by the Inference Engine Functional and Unit tests. Different helper functions, blob comparators, OS specific constants, etc are implemented within the utilities.
    Internal namespaces (for example, CommonTestUtils::, FuncTestUtils:: or UnitTestUtils::) must be used to separate utilities by domains.

    Note

    : All the utilities libraries are added to the developer package and available for closed source development.