Commit Graph

176 Commits

Author SHA1 Message Date
Gabriele Galiero Casay 371fc7aee4
Enable low precision types in ConvertLike operation reference implementation (#6890)
* Enable low precision types for ConvertLike operation

* Migrate backend unit test suite to template plugin reference tests

* Fix typo in naming convention

* Avoid duplication of template plugin tests execution

* Add file to instantiate TEST_P and avoid test execution duplication
2021-08-06 11:19:16 +03:00
Yury Gaydaychuk 7ab92b5845
[CPU] Adaptive pooling implementation (#6594) 2021-07-29 20:41:24 +03:00
Jozef Daniecki 226cb952ae
Select operation revision (#6483)
* Add visitor test.

* Add Serialization SLT.

* Add Select-1 to summarize.py.

* Remove select from evaluates map.

* Remove few Select cases from manifest.

* Fix style.

* Refactor CoordinateTransform usage for NUMPY.

* Refactor CoordinateTransform usage for PDPD.

* Migrate backend tests to template_plugin.

* Revert "Fix style."

This reverts commit 8298c90104.

* Add more template plugin tests.

* Fixes for PDPD broadcasting.

* Align Select type prop tests with PDPP broadcasting to new
implementation.

* Remove ngraph:: from types in tests.
2021-07-21 08:13:40 +03:00
Patryk Elszkowski 0d9212683f
FakeQuantize - reference implementation refactor (#6478)
* new implementation of FakeQuantize

* move FakeQuantize backend test to fake_quantize.in.cpp

* enable some test for FakeQuantize

* Add support for PDPD broadcasting and some backend tests

* arm plugin expect less attributes in function call

* try to fix arm plugin build

* try to build arm plugin

* start changing backend test

* add check for attributes number in visitor test

* fix backend test after refactoring

* add default parameter value to runtime::reference::fake_quantize

* Revert "add default parameter value to runtime::reference::fake_quantize"

This reverts commit 9d2c00d967.

* add SLT for FakeQuantize

* remove fesetround

* change `v1` namesapce to `v0` in ref impl

* add FakeQuantize-1 to VERIFIED_OP_REFERENCES

* pass immutable reference to test functions
2021-07-19 12:20:54 +03:00
Ivan Tikhonov 697c52abfe
DeformableConv v8: reference implementation (#6514)
* DeformableConv v8:reference implementation

* ngraph codestyle

* update reference iplementation

* Disable tests on GPU

* fix unit tests

* Update DeformConv single layer tests

* fix serialization tests
2021-07-19 06:15:34 +03:00
Ilya Churaev 23f4bf4e70
Removed legacy tests (#6558) 2021-07-08 08:01:40 +03:00
Luo Cheng da8aeec07b
Reference implementations for MulticlassNms and MatrixNms ops (#6264)
* Reference implementations for MulticlassNms and MatrixNms ops

* fix name conflict

* remove unused var
sort_result_across_batch default set to false

* avoid float overflow

* fix clang check error

* info for mac fail

* change testcase due to unstable sort

* nms add 'normalized' attribute

* fixes: 1. normalized support. 2. sort by score before keep_top_k inside a batch.

* fix sort order in matrix_nms

* fix review comments

* use structure for attributes

* avoid centos gcc fail

* avoid centos gcc failed

* Update evaluates_map.cpp

header file alpha-beta order to avoid possible conflict in future.

* use pointer instead of HostTensorVector

* fix review comments

* fix review comments

* use reference pass parameter

* reuse rect,boxinfo,postprocess

* fix compiling fail

* fix review coments

* use TestCase instead Backend

* fix macos case failed

Co-authored-by: jialipen <cecilia.peng@intel.com>
Co-authored-by: Zhang Yi3 <yi3.zhang@intel.com>
Co-authored-by: yuvrgb <yuvrgb@outlook.com>
2021-07-07 11:19:49 +03:00
Maxim Vafin f1af26dbaf
Add adaptive pool reference implementation (#6317)
* Add adaptive pool reference implementation

* Add forgotten files

* Fix codestyle

* Disable tests

* Add more tests

* Fix build

* Fix comments

* Remove CoordinateTransform usage from AdaptiveAvgPool

* Fix build

* Refactor AdaptiveMaxPool

* Fix codestyle

* Apply review feedback

* Simplify if statement
2021-07-05 08:36:27 +03:00
Vladimir Gavrilov 1d7f81c108
Implement reference nGraph implementation for operation ExperimentalDetectronGenerateProposalsSingleImage (#5881)
* Written header file for the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Small fixes.

* Started to write cpp-file for the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Written the postprocessing function for the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Code style fixes.

* Started to write calculations of the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Written the helper function refine_anchors().

* Written the helper function unpack_boxes().

* Small fix.

* Code style fixes.

* Written calculations of the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Code style fixes.

* Fixed type of one argument of fill_output_blobs().

* Code style fix.

* Written evaluate() for the operation ExperimentalDetectronGenerateProposalsSingleImage (in evaluates_map.cpp).

* Deleted redundant 'using' for typedef.

* Continued to write tests for ExperimentalDetectronGenerateProposalsSingleImage evaluation in the nGraph reference implementation.

* Fixed the reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Deleted commented code. Code style fixes.

* Code style fix.

* Deleted debug prints in the test for an evaluation of the nGraph operation ExperimentalDetectronGenerateProposalsSingleImage.

* Enabled ONNX Importer test for the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Enabled some test.

* Small fix.

* Now postprocessing of the nGraph reference realization of the operation ExperimentalDetectronGenerateProposalsSingleImage throws exception when input data type is not supported.

* Code style fix.

* Written yet another  test for the nGraph reference implementation of the operation ExperimentalDetectronGenerateProposalsSingleImage.

* Reused ProposalBox type from the reference implementation of the operation Proposal.

* Added check for the attribute post_nms_count in the operation ExperimentalDetectronGenerateProposalsSingleImage evaluation.

* Small fixes.
2021-07-01 14:42:51 +03:00
Ilya Lavrenov 07f94ea602
Minimized usage of `IE_MAIN_SOURCE_DIR` (#6422)
* Minimized IE_MAIN_SOURCE_DIR hardcode

* Used COMPILE_OPTIONS instead of COMPILE_FLAGS

* Fixed compilation

* Enabled NGRAPH_DYNAMIC_COMPONENTS_ENABLE by default

* Fixes

* Moved GNA related file

* Fixed backend compilation

* Fixed Windows for ngraph

* Fixed <root>/tests build

* More updates

* Fixed scripts install

* Fixed Windows

* Fixed Windows
2021-06-30 18:15:41 +03:00
Szymon Durawa 055a70bdf9
Add output_padding and output_shape into GroupConvolutionBackprop SLTs. (#6302)
* Add output_padding and output_shape into GroupConvolutionBackprop SLTs.

* Add legacy API for arm-plugin dependency.

* Replaced templated input, output and filter with one template.

* Apply correct format.

* Change to use INSTANTIATE_TEST_SUITE_P macro.
2021-06-29 15:34:29 +03:00
Ilya Lavrenov 391aeebf7e
Added install rules for tests (#6344)
* Moved cmake/templates to <root>

* Removed ngraph versioning, reused IE one

* Merged converage

* Removed duplicatde ngraph cmake options

* Moved dependencies to <root>/cmake

* Removed installing of VERSION

* Start #1

* cpack

* Added component type

* Added installation of tests targets

* Added ngraph tests target install

* Fixed runtime dependencies location

* Disable GNA unit tests

* Revert "Disable GNA unit tests"

This reverts commit da5398622f.

* Installed only core component

* Replaced ENABLE_DEV_PKG_INSTALL with EXCLUDE_FROM_ALL

* Removed extra cmake options
2021-06-25 15:17:17 +03:00
Ilya Lavrenov 92239b39bf
Partially merge ngraph / IE cmakes (#6316)
* Moved cmake/templates to <root>

* Removed ngraph versioning, reused IE one

* Merged converage

* Removed duplicatde ngraph cmake options

* Moved dependencies to <root>/cmake

* Removed installing of VERSION
2021-06-24 13:14:04 +03:00
Piotr Szmelczynski 77912ca06e
Revise negative (#5955)
* update spec

* add RTTI macro

* create visitor test

* clean backend test file

* add negative to type_prop tests of unary_ops

* add validate_and_infer_types method

* remove negative from type_propp unary_ops

* create negative type_prop tests

* remove boolean check from validate_and_infer_types

* update supported types in spec

* Remove check for signed numeric types

* Remove type_prop test cases with non-signed type

* Add zero sized negative test to interpreter manifest

* Revert "update supported types in spec"

This reverts commit a7ac3e4dc8.

* Revert "update spec"

This reverts commit 4c431d753d.

* Add minor changes to review op class

 * Add validation of inputs and outputs in evaluate
 * Use shape from host tensor to calculate element count

* Minor changes in variable names of backend tests

* Add SLT case with integer precision

* Add operation to list of trusted ops

* Address review comments:

 * Add bf16 precision to evaluate method
 * Use unary ops typed case tests for type_prop tests
 * Add end of line to interpreter manifest

* Refactored visitor unit test

* Fix typo in visitor test name

Co-authored-by: ggalieroc <gabriele.galiero.casay@intel.com>
2021-06-22 09:44:31 +03:00
Gabriele Galiero Casay c3d1c2e420
Revise reference implementation for ReduceMax operation (#5792)
* Revise reference implementation for ReduceMax operation

* Refactor backend unit tests

 * Move tests with zero dims to op_eval
 * Remove test with double elem type

* Fix code style

* Added minor changes

 * Replace CoordinateTransform for CoordinateTransformBasic
 * Added constant expression to set keep_dims as false

* Add const qualifier to local variables

* Use host tensor to retrieve and normalize axes
2021-06-15 16:12:12 +03:00
Szymon Durawa 978121e91e
Ref implementation transposed convolution revise (#4999) 2021-06-14 13:28:32 +02:00
Gabriele Galiero Casay ddc27d3513
Revise reference implementation for ReduceSum operation (#5728)
* Revise reference implementation for ReduceSum operation

* Refactor backend unit tests

 * Move tests with zero dims and dynamic shapes to op_eval
 * Removed tests for f64 precision not supported

* Add support for precisions bf16, i8 and u8

* Clean up interpreter manifest unit tests

* Create ticket for result mismatch and accuracy failing tests

* Disable back interpreter tests failing for ubuntu18 i386 for large tensors

* Revert "Add support for precisions bf16, i8 and u8"

This reverts commit 8f1bba0dff.

* Add to manifest tests with disable types of reference implementation

* Address review comments

 * Use constexpr variable to set keep dims as false in reduction output shape
 * Replace CoordinateTransform with CoordinateTransformBasic

* Fix typo in variable name

* Remove keep_dims parameter from sum function call
2021-06-11 07:41:44 +03:00
Roman Kazantsev 5e8d1ccf92
Implement Einsum reference in nGraph interpreter (#5923)
* Implement Einsum reference in nGraph interpreter

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply code-style patch and fix build issues

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix CI build

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix fast build and apply code review feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add visitor API tests, check for input type and reduce memory consumption

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply code style

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add visitor API tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-06-04 11:08:30 +03:00
Vladimir Gavrilov fe8443d9f8
Implement reference nGraph implementation for operations "ExperimentalDetectronDetectionOutput", "ExperimentalDetectronPriorGridGenerator" (#4004)
Implemented reference nGraph implementation for operations "ExperimentalDetectronDetectionOutput" and "ExperimentalDetectronPriorGridGenerator" #43928
2021-05-27 15:17:09 +03:00
Vladimir Gavrilov 91fd2574df
Implement reference nGraph implementation for the operation "ExperimentalDetectronTopKROIs" (#5675)
* Started to write nGraph reference implementation of the operation ExperimentalDetectronTopKROIs.

* Written cpp-file for the nGraph reference implementation of the operation ExperimentalDetectronTopKROIs.

* Code style fixes.

* Started to write evaluate() (in evaluates_map.cpp) for the nGraph operation ExperimentalDetectronsTopKROIs.

* Code style fixes.

* Written evaluate() for ExperimentalDetectronTopKROIs.

* Small fixes.

* Written test for ExperimentalDetectronTopKROIs evaluation.

* Small fix.

* Fixed Apache license header.

* Some changes.

* int64_t was replaced with size_t in the body of ngraph::runtime::reference::experimental_detectron_topk_rois().

* Added more test for evaluation of ExperimentalDetectronTopKROIs.
2021-05-26 17:49:33 +03:00
Jozef Daniecki 9eb7bfdfc0
More unit tests for Convert reference implementation. (#5745)
* Add Convert unit tests to check C++ to LP types convertion.

* Add unit tests to check LP types to C++ ints.

* Disable LP to C++ ints tets in CPU plugin.

* Remove f64 support from Convert evaluate.
2021-05-24 13:05:54 +03:00
Mikhail Treskin 66d98530d9
Handle 3rd optional input in CTCGreedyDecoderSeqLen evaluate (#5669)
* Handle 3rd optional input in CTCGreedyDecoderSeqLen evaluate

* Add test for OP without blank_index input

* Fix default blank_index calculation
2021-05-24 12:24:46 +03:00
Vladimir Gavrilov 6bb5a2c3cb
Add proper signal_size handling for reference nGraph implementation for operations DFT and IDFT (#5610)
* Added tests for 2D DFT when we have signal_size and axes [0, 2].

* Rewritten reference implementation of DFT and IDFT.

* Code style fixes.

* Reverted changes.

* Added debug prints.

* Temporarily commented some functions.

* Reverted changes in (I)DFT reference.

* Added more debug prints (in evaluates_map.cpp, to evaluate() for IDFT).

* Added setting output shape for DFT and IDFT evaluate() in evaluates_map.cpp.

* Added more tests for signal_size case of DFT.

* Written tests for signal_size case of IDFT.

* Deleted debug prints from (I)DFT reference implementation (the file fft.cpp).

* Deleted debug prints from evaluate() for DFT and IDFT.

* Deleted debug prints from tests for DFT.

* Deleted debug prints from IDFT tests.

* Code style fixes.

* Enabled CPU evaluation tests for DFT and IDFT in CPU supported cases.

* Enabled CPU (I)DFT layer tests.

* Copied fix for specialization of function is_float() for (b)float16 from Pertovsky Aleksandr's PR 5654.

* Reverted changes in the function is_float() from ie_precision.h.

* Disabled BF16 CPU FuncTests for (I)DFT.

* Deleted filling 'buffer' by zeros. Simplified the function lengths_except_given_axis.

* Small fix.

* Code style fix.

* Reverted deleting 'std::fill(buffer.begin(), buffer.end(), complex_type{0.0f, 0.0f});'

* Reverted changes in the function lengths_except_given_axis().

* Changes in the function lengths_except_given_axis().

* Small fix.

* Deleted commented code.

* Simplifications in the function lengths_except_given_axis().

* Deleted commented code.

* Enabled BF16 (I)DFT CPU FuncTests.

* Fixed comments before disabled (I)DFT IE_CPU tests.
2021-05-20 17:57:39 +03:00
Irina Efode 9568f8120e
[IE TESTS] Fix Comparation issue in `LayerTestCommon` class (#5624)
* [IE TESTS] Fix comparation in LayerTestUtils

* Fixes

* Small fix

* Int4 fixes

* remove extra

* Fix NMS

* Some fixes for tests

* Add small fix

* [IE TESTS] Remove const folding as a result engine

* Remove extra

* Revert remove constant folding (DSR test) & fix some cases for cpu

* Fix GNA
2021-05-19 13:14:35 +03:00
Bartek Szmelczynski 314a1d7de3
Revise gelu (#5327)
* add type_prop and backend tests for gelu op

* add visitor test for gelu op

* add additional type_prop and backend tests and remove gelu from manifest

* resolve conflicts

* fix indentation and remove unecessary includes

* remove gelu from manifests
2021-05-14 07:39:48 +03:00
Katarzyna Mitrus f928f7fc56
DeformablePSROIPoolig reference implementation (#5116)
* Reference implementation init

* Backend tests

* Single layer tests

* Update offset range in layer tests

* Align int types with ng op

* Update spatial bins type

* Type update

* Fix sub bin calculation in mkldnn plugin

* Update summarize py file

* Align result  type

* Refactoring

* Apply review comments

* Add serialize layar tests

* Adjust int comparison

* Adjust code style

* Use clamp reference

* Unify style

* Additional check for negative output dim

* Set tensor output shape in evaluate

* Add visit attributes test

* Small refactor

* Code style (namespace comments)

* Fix CommonTestsUtils::fill_data_roi usage.

This function was generalized in PR #5432 and its siganutre has changed.

* Update licenese header with mention about original authors.

* Replace MIT SPDX full license name with short identifier.

* Fix sub bin calculation in mkldnn plugin

Co-authored-by: jdanieck <jozef.daniecki@intel.com>
2021-05-13 07:44:57 +03:00
Gabriele Galiero Casay 6971303856
Revise BatchNormInference Reference Implementation (#5468)
* Refactor backend tests

* Rewrite reference implementation

 * Align ref impl signature with order of inputs in v5
 * Remove legacy code for training and backprop

* BarchNorminference operation class review

 * Use reference to const in helpers to validate input shapes
 * Refactor type_prop tests to cover v0 and v5

* Add type_prop tests

 * epsilon attribute test with invalid value
 * invalid integer input types

* Add serialization single layer test

* Add attribute visitor test

* Fix arm plugin test failure with dynamic element type

* Remove CoordinateTransform index call

* Add attribute count to visitor test
2021-05-12 13:47:50 +03:00
Tomasz Dołbniak 3e8bc2db69
Handle f32/bf16 conversion in UT (#5330) 2021-04-22 11:59:29 +02:00
Ilya Churaev a672b9c599
Enabled Wall for nGraph (#5270)
* Enabled Wall for nGraph

* Fixed Linux build

* Fixed ONNX Editor and class-memaccess

* Fixed topK

* Fixed some builds

* Fixed nGraph Python API

* Use std::fill instead of cycle

* Wno-unded and deprecation for app python versions
2021-04-22 06:24:03 +03:00
Jozef Daniecki ef70e5187c
Deformable convolution (#4312)
* Add deformable_convolution unit tests

* add 2D unit test

* Add unit-tests for 3D deformable_convolution

* create shared test class for deformable_convolution

* create single layer test for cpu plugin

* create single layer test for serialization

* add deformable_convolution to opset1

* create empty evaluate method

* add group and deformable_group to parameters

* Create impl for generateInput method

* add deformable_val to deformable_conv paramset

* create additional unit-tests

* Remove 3D single layer tests

* Update GenerateInput and SetUp method

* Update parameters values for SLT

* Update GenerateInput method and create Validate method

* Create additional parameters set for cpu plugin SLT

* Create unit-test with padding and add it to disabled

* add interpreter unit tests to manifest

* style-apply

* create file for reference impl

* Update year of copyright and make Validate an override method

* Update parameters names for serialization single layer tests

* Update parameters names for functional single layer tests

* add failing unit tests for interpreter to manifest

* make tests parameters more readable

* style-apply

* Include deformable_convolution inside evaluates_map

* add support for groups parameter for reference impl

* style-apply

* remove DeformableConvolutionParams struct

* fix bug with filter

* fix bug with offset type

* Update interpreter manifest

* impl evalute method

* style-apply

* Update year

* Update test names

* add utils func for deformable convolution operation

* fix filter group count

* add calculation of index of offset

* Update offsets in unit test

* add support for multiple input channels

* add padding tests

* add padding support

* style apply

* update copyright year

* create validation check helper

* Update convolve function name

* update copyright year

* style-apply

* remove integer type from serialize layer tests

* add tests for deformable_groups

* fix bug with group > 1

* style-apply

* add group unit test

* create additional group tests

* fix bug with groups attribute

* Enhance dynamic shape inference of validate and infer types method

* Add type_prop unit tests

* Fix broken op create test in python api

* fix bug with shapes in group tests

* update deformable_convolution method

* add unit test with 2 groups and 2 defromable groups

* Fix code style.

* Update UT manifests with  current test status.

* Refactored backend test: names, removed duplication, add TOODs

* Add missing test cases in 'integral offsets' group.

* Fixed group attribute.

* Update interprer manifest to disable tests with integer offsets.

* Fix style.

* Remove changes in operator class.

* Revert "Enhance dynamic shape inference of validate and infer types method"

This reverts commit 2f9ce2ccd4.

* Revert "Add type_prop unit tests"

This reverts commit 944af98b8c.

* Revert "Fix broken op create test in python api"

This reverts commit 72fbfc2967.

* Fix op class.

* Convert implementation to 2D.

* Simplify implementation.

* Fix centos build.

* Reimplemented offsets handling.

* Fixed integral offsets test cases.

* Fixed deformable group attribute.

* Add bilinear interpolation.

* Refactoring regarding tolerance_bits.

* Fix groups & def_groups test case.

* Add more unit tests for group & defgroup attribute.

* Remove debug code.

* Minor refactoring.

* Add integer types to SLT.

* Revert "Add integer types to SLT."

This reverts commit 2fefe8926d.

* Add tests with real number offsets.

* Refactored bilinear_interpolation().

* Turned on SLT.

Additionally refactored and offset input set to range <0,2>.

* Update headers with short version.

* Fix SLT offests generation with int offsets.

* Add integer types to SLT.

* Fix grup + def_group test case.

* Add ticket to address IE_CPU backend test failures

* Enable real resolution for deformable values

* Add op to list of trusted operations in python script

* Fix comparison of integer expressions of different signedness compilation error

* Add comment with closing namespace and empty lines

Co-authored-by: pszmel <piotr.szmelczynski@intel.com>
Co-authored-by: ggalieroc <gabriele.galiero.casay@intel.com>
2021-04-19 14:12:09 +03:00
Bartek Szmelczynski 6e7a8af2be
Revise squared difference (#5091)
* clean SquaredDifference op from legacy FusedOp operation

* add backend and type_prop tests for squared_difference operation

* apply requested changes

* fix op name

* revert date change

* update squared_difference op info with ngraph RTTI

* change test since squred_diff should be binop
2021-04-16 06:49:27 +03:00
Ilya Churaev 543acb517e
Enabled sign-compare flag for nGraph (#5189)
* Enabled Werror flag for nGraph

* Fixed softmax test

* Fixed ONNX Editor

* Fixed gather_nd

* Fixed i32 compilation
2021-04-15 12:12:51 +03:00
Vladimir Gavrilov f2366f7072
Reference implementation of DFT and IDFT operations (#4938)
* Started to write the header file for (I)DFT reference implementation.

* Continued to write the header file for (I)DFT reference implementation.

* Renamed the header file for the reference implementation of (I)DFT.

* Started to write an implementation file for the reference implementation of (I)DFT.

* Continued to write an implementation file for the reference implementation of (I)DFT.

* Continued to write an implementation file for the reference implementation of (I)DFT.

* Small fix.

* Written copying data from input and copying data to output.

* Code style fixes.

* Small fix.

* Some fixes.

* Some fixes.

* Small fix.

* Written naive version of (I)DFT calculation.

* Some fixes.

* Some fixes.

* Some fixes.

* Some fixes.

* Some fixes.

* Small fixes.

* Written the draft of the reference implementation of (I)DFT.

* Small fix.

* Small fix.

* Code style fixes.

* Added evaluation of (I)DFT to evaluation_map.cpp.

* Small fixes.

* Some fixes.

* Written test for evaluation of 1D DFT.

* Fixed ngraph/test/CMakeLists.txt.

* Disabled DFT evaluation test in CPU, because (I)DFT has not implemented yet in CPU.

* Added debug prints to evaluation test of DFT.

* Added debug prints into evaluate_map.cpp for DFT evaluation.

* Added some debug prints into FFT calculation.

* Added more debug prints.

* Added more debug prints.

* Added more debug prints.

* Added more debug prints.

* Added more debug prints.

* Small fix.

* Added more debug prints.

* Added more debug prints.

* Small change.

* Some fixes.

* Small fix.

* Some changes.

* Added more tests.

* Added test for IDFT 1D calculation.

* Some fixes.

* Added more debug prints.

* Small fix.

* Small fix.

* Some fixes.

* Some fix.

* Small fix.

* Added tests for 2D case of IDFT.

* Some fixes.

* Written tests for 3D case of DFT.

* Some fixes.

* Small fix.

* Added test for 3D case of IDFT.

* Some fixes.

* Deleted debug prints from tests for IDFT.

* Deleted debug prints from tests for DFT.

* Deleted debug prints from the reference implementation of (I)DFT.

* Code style fixes.

* Deleted debug prints from evaluates_map.cpp.

* Written the header file for the base class of DFT and IDFT operations.

* Written an implementation of the base class of DFT and IDFT.

* Now nGraph IDFT operation class is a derived class of FFTBase.

* Now the nGraph operation DFT is a derived class of FFTBase.

* Added assert for axes in (I)DFT reference.

* Small refactoring.

* Deleted commented code.

* Small refactoring.

* Small fix.

* Initialization of calculations of the reference implementation of (I)DFT was moved in the separate function.

* Small fix.

* Code style fix.

* Small fix.

* Now evaluate() of (I)DFT uses canonicalize_axes() from the reference implementation.

* Code style fix.

* Deleted commented code.

* Added tests for i32 axes of DFT.

* Added test for i32 axes of 2D DFT.

* Added i32 axes case to test for 3D DFT.

* Added test for i32 axes in tests for IDFT.

* Written signal_size case test for 1D DFT.

* Small fix.

* Written test for signal_size case for 2D DFT.

* Added test for bfloat16 input data of 1D DFT.

* Small fix.

* Small fix.

* Small fix.

* Some fixes.

* Some fix.

* Added bfloat16 input tests for 2D DFT.

* Some fixes.

* Written tests for bfloat16 input of 3D DFT.

* Some fixes.

* Some fixes.

* Added tests for bfloat16 input of 1D IDFT.

* Some fixes.

* Added tests for bfloat16 input of 2D IDFT.

* Added test for bfloat16 input of 3D IDFT.

* Small fix.

* Some fixes.

* Added tests for float16 input of 1D DFT.

* Small fix.

* Written tests for float16 input of 2D and 3D DFT.

* Small fix.

* Some fixes.

* Some fixes.

* Written tests for float16 inputs of 1D, 2D, 3D IDFT.

* Some fixes.

* Some fixes.

* Some fixes.

* Some fixes.

* Deleted redundant include.

* Some fixes.

* Added tests of 1D and 2D DFT for the case when some axes lengths are powers of 2.

* Added tests for 3D DFT and 1D, 2D, 3D IDFT in the case when lengths of some axes are powers of 2.

* Small fix.

* Added some comments.

* Added some comments.
2021-04-14 10:52:57 +03:00
Pavel Esir 6d2740a335
[nGraph] Gather 7 evaluate (#5088)
* initial working solution

* constant_folding for Gather-7 successfully enabled

* successfuuly added remaining unittests

* removed redundant evaluate from private

* fixed evaluate for dynamic axis

* fix pre-commit for KMB: added default batch_dims=0 to runtime/reference

* clang_format_fix

* added include ngraph/shape.hpp to fix compilation for onednn-plugin

* temporary removed out of bound check for gather

* removed optional argument for batch_dims

* added const

* finally successfully run on ARM: removed redundant declaration

* style fix

* changed argument types from size_t -> int64_t

* changed back to size_t
2021-04-12 17:01:39 +03:00
Bartek Szmelczynski 4120344d11
Revise mod (#5060)
* clean the FusedOp from mod operation

* add backend and type_prop tests for mod operator

* convert taking autobrodcast to match binary elementwise arithmetic ops

* add type_prop/mod.cpp to CMakeLists.txt

* fix style

* fix style v2

* remove evaluate method and add backend test for negative numbers

* add copyright for type_prop/mod.cpp
2021-04-03 19:07:01 +03:00
Anastasia Popova 440d2abd1f
Roll reference implementation (#4947)
* Added reference implementation for Roll operation.

* Small corrections.

* Removed duplicate test disabling.

* Changed implementation using manual data manipulation.

* Removed unnecessary function.

* Corrected tests, added converting axes and shift to int64.
2021-04-02 14:12:37 +03:00
Tomasz Socha 320009d3b2
[nGraph][ONNX Importer] Bunch of small fixes (#4990) 2021-03-31 15:36:42 +02:00
Tomasz Dołbniak 170223d842
DeformableConv2D custom ONNX op (#4816) 2021-03-30 14:44:44 +02:00
Gabriele Galiero Casay 902a89b582
Revise Clamp reference implementation (#4813)
* Operation class review

* Remove clamp from FusedOp
* Add node validation checks
* Add type_prop unit tests

* Move backend unit tests into a separate file

* Remove unnecessary includes

* Add support for i8, i16, u8, u16 and bf16 precisions

* Refactor backend unit tests

   * Remove instance with f64 precision
   * Move dynamic shape tests to op_eval
   * Group failing tests into manifest

* Add single layer tests and serialization tests

* Skip tests with conversion due to plugin misbehavior

* Add unit tests fails to manifest with documented issues

* Fix centos7 test to skip slt cpu instances of integer precision

* Enable dynamic test for float element type

* Address review comments
2021-03-29 22:53:34 +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
Ivan Novoselov ec5df02dac
Revise OneHot operation reference implementation (#4330)
* Auto benchmarks for evaluate(...) and extra unit tests.

* Test suite for manual i/o examination.

* Template on input type. Constant folding tests the 'count_ops_of_type' issue.

* Multidim manual tests

* NgOp&Ref: Unit tests Ok. NB evaluates_map

* Stable. Negative indices as if larger than depth. Benchmarks removed.

* Added Serialization SLT

* I/O shapes consistency checks

* Consistency checks in evaluate(). Removed the ref from evaluates_map.

* removed excessive #include from evaluates_map

* Code style
2021-03-16 11:28:30 +03:00
Katarzyna Mitrus 5f098e1079
nGraph code style upgrade to clang-format-9 (#4721)
* ngraph clang-format upgrade to 9

* Reformatted files

* Remove comma at the end of test data vector
2021-03-15 22:06:01 +03:00
Gabriele Galiero Casay bd949c6baf
BinaryConvolution Reference Implementation (#4278)
* Add BinaryConvolution unit tests.

* Changed types to u1.

* Add BIN precision handling in TestCase class.

* Refactored validate and infer types to enhance dynamic shape inference

* Add type_prop test to cover invalid op cases and dynamic shapes

* Fix style

* Disable check for float type of data batch input

* Add type_prop test for incompatible input channels in inputs

* Disable backend unit tests

* Fix style

* Add reference implementation

* Add backend tests

* Add single layer tests

* Add check for float element type of batch data input

* Refactor backend test cases to compare with regular convolution

* Add serialization tests

* Clean up

* Add 1D and 3D tests into op_eval

* Changes in reference implementation to improve readability

* Add ticket information for todo tasks

* Fix implementation misbehavior for filter channels

* Add backend unit tests to cover strides, dilations, padding, channels and batches

* Add end of line into files

* Change name of type_prop unit tests

* Simplified lambda to get spatial dimensions of filters

* Add comment to support filters input as Parameter

* Add namespace details for BinaryConvolution utility functions

* Address review comments

Co-authored-by: jdanieck <jozef.daniecki@intel.com>
2021-03-09 22:58:25 +03:00
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
Katarzyna Mitrus 76fed9315e
Legacy LSTM/RNN/GRU tests clean up (#4265) 2021-02-26 14:27:18 +01:00
Jan Iwaszkiewicz 7af2959bd0
[ONNX] Convert to integral type in OneHot op (#4229)
Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>
2021-02-10 14:03:54 +01:00
Michał Karzyński 751ac1aef4
Add support for custom ExperimentalDetectron ops to ONNX Importer (#4030) 2021-02-09 10:31:32 +01:00
Jozef Daniecki 0acd153a6c
Group convolution backprop data (#4113)
* GroupConvolutionBackpropData: Added backend unit tests

* GroupConvolutionBackpropData: Refactor SLT and added tests for 1D

* GroupConvolutionBackpropData: Added Serialization tests

* GroupConvolutionBackpropData: Added GroupConvolutionBackpropData reference implementation

* GroupConvolutionBackpropData specification refactoring.

* GroupConvolutionBackpropData: Added validation node checks for the op

* GroupConvolutionBackpropData: Copyright year fixed

* GroupConvolutionBackpropData: Enhanced output shape inference with dynamic shapes

* GroupConvolutionBackpropData: Remove redefinition of helper variables

* Spec refactoring: add ticks to types and layouts.

* Minor refactoring.

* GroupConvolutionBackpropData: Moved backend tests from GroupConvolution to corresponding file

* GroupConvolutionBackpropData: Improved output shape inference for fully dynamic inputs

* GroupConvolutionBackpropData: Clean up type_prop tests

* Fix banner in GroupConvolution shared test class.

Co-authored-by: ggalieroc <gabriele.galiero.casay@intel.com>
2021-02-08 13:38:14 +03:00
Bartosz Lesniewski 210ad8194a
Proposal reference implementation (#3924)
* 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
2021-02-08 07:09:54 +03:00
Jozef Daniecki 4b1efeb858
Group convolution (#3995)
* GroupConvolution SLT style refactoring.

* Add GroupConvolution 1D SLT.

* Add GroupConvolution Serialization SLT.

* Add GroupConvolution ref impl to evaluates_map.

* Add GroupConvolution ref impl.

* Fix compilation on master.

* GroupConvolution specification update.

* Readability refactoring.

* Specification refactoring.

* Added 'output' section in GropuConvolution spec.
2021-02-03 16:07:01 +03:00