Commit Graph

151 Commits

Author SHA1 Message Date
Gabriele Galiero Casay 8c68f8b43c
Revise reference implementation for ReduceMin operation (#5797)
* Revise reference implementation for ReduceMin operation

* Refactor backend unit tests

 * Move tests with zero dims to op_eval

* 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

* Re-arrange unit tests in manifest
2021-06-16 09:01:57 +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
Gabriele Galiero Casay 134c66a933
Reference Implementation of Logical Reduce Operations (#6004)
* Remove CoordinateTransform call to index function to calculate tensor element indexes

* Allow negative axis values in axes host tensor

* Added constant expression to set keep_dims as false

* Use rank from host tensor to normalize axes

* Address minor comments

* Add const qualifier to local variables
* Add deprecated macro for arm plugin dependent function signatures

* Remove duplicate helper functions
2021-06-15 12:06:30 +03:00
Patryk Elszkowski 766d011b06
reshape reference implementation - new implementation (#5559) 2021-06-15 07:25:19 +03:00
Gabriele Galiero Casay b4a4c9110c
Revise Reference Implementations ReduceLp operations (#6065)
* Revise reference implementation for ReduceL1 operation

* Revise reference implementation for ReduceL2 operation

* Move op_eval tests to backend unit tests

* Added minor changes

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

* Add const qualifier to local variables

* Use rank from host tensor to normalize axes
2021-06-15 07:18:57 +03:00
Katarzyna Mitrus 8dff04df28
ShuffleChannels ng op and reference implementation revision (#5764)
* Unblock shuffle channels tests from ie test manifest

* Add more backend tests

* ShiffleChannel reference impl update

* Update attr visitor test

* Remove unused get_pre_shuffle_shape helper function

* Update class descriprion

* Add type prop shape tests

* Remove NGRAPH_SUPPRESS_DEPRECATED macro

* Add single layer tests

* Update layer tests

* Remove unused header

* Move implementation to cpp file
2021-06-15 07:04:06 +03:00
Szymon Durawa 978121e91e
Ref implementation transposed convolution revise (#4999) 2021-06-14 13:28:32 +02:00
Gabriele Galiero Casay dc415573d4
Revise reference implementation for ReduceProd operation (#5774) 2021-06-14 11:29:33 +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
Katarzyna Mitrus bc7f61be24
PRelu reference implementation and ReshapePRelu transformation alignment (#5915)
* Apply  ReshapePRelu transformation only to const slope input

* Remove xfail from onnx backend prelu_broadcast test

* Fix and add Prelu SLT

* Update PRelu mkldnn transformation to extend broadcast support

* Fix and update PRelu reference implementation

* ONNX Prelu tests

* Add prelu backend tests

* Update ie tests manifest

* Comments clean up

* Fix STL Fill leakyslope blob

* Code refactor

* Unify layer tests slope input values generation
2021-06-08 06:51:41 +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
Ilya Churaev 34b02a5254
Fixed KW issues (#5977) 2021-06-02 12:35:27 +03:00
Jozef Daniecki 143fc069a6
Fix 'operands of different size in bitwise operation' klockwork issue. (#5914)
* Fix 'operands of different size in bitwise operation' klockwork issue.

* Changed 'byte_idx' type to size_t.
2021-06-02 08:50:10 +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
Egor Duplensky e754a6b46f
[CPU] Fix RegionYolo (v3) node and Ngraph reference implementations (#5748) 2021-05-26 11:44:36 +03:00
Katarzyna Mitrus eba2410411
Remove deprecated legacy transpose ref function (#5765) 2021-05-24 20:05:29 +03:00
Alexandra Sidorova a74ba7b18e
Fixed Softplus ref (#5755) 2021-05-24 14:34:12 +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
Jozef Daniecki 9e46be75af
Low precision types support in Convert operation (#5640)
* Add initial version of u1 type support.

* Turn off u8_to_u1 test in IE.CPU.

* Fix compilation issue.

* Replace std::memset with std::fill.

* Add u4 type support.

* Add i4 support.

* LP types support generalized.

* Remove std::copy optimization.

* Fix backend test for LP types.

* Fixed arm plugin compilation.

* Add LP types to Serialization SLT.

* Add Convert to summarize.py report.
2021-05-21 13:11:43 +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
Vladislav Volkov d2c9bddff1
Convert operation optimization for FP16 -> INT8 and FP32 -> INT8 (#5275)
Improvements for ConvertPrecision transformation pass
2021-05-14 13:48:02 +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
Jozef Daniecki 2ba5c344be
Add unit tests for Convert operation (#5558)
* Add Serialization SLT for Convert op.

* Add comment with explanaition to convert ref impl.

* Refactored backend tests for Convert operation.

* Give better names to backend tests.

* Add more backend unit tests.

* Fixed tests related to u1/u4/i4 types.
2021-05-12 14:35:12 +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
Gabriele Galiero Casay a78515f3e7
Revise DeformableConvolution operation class (#5244)
* Enhance dynamic shape inference of validate and infer types method

* Review op class of DeformableConvolution

   * Add node validation checks into validate and infer types specific to element type and shape of inputs
   * Refactor validate and infer types method to use common function to validate conv parameters and infer output shape
   * Apply these changes to Convolution and BinaryConvolution for alignment

* Add type_prop unit tests

* Add node validation checks for deformable values spatial dimensions

* Fix type_prop and python api shapes

* Fix deformable values spatial dimensions

* Add validation checks in reference implementation

* Address review comments

 * Remove reference to const for basic types in ref impl
 * Update comment with ticket to add check for u1
 * Change deformable values to offset to align with spec
2021-05-12 09:21:33 +03:00
Patryk Elszkowski f089c40bb4
update tanh reference implementation (#5478)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-05-11 08:53:08 +03:00
Katarzyna Mitrus a7353f4b28
Revision of Sqrt op and reference implementation (#5446)
* Add NGRAPH_RTTI

* Instantiate unary ops type prop tests for Sqrt

* Add sqrt backend tests

* Add rounding for int types to Sqrt reference implementation
2021-04-30 16:53:14 +03:00
Alexandra Sidorova 03ca3d1ef7
[CPU] Fixed SoftPlus for large positive values (#4932) 2021-04-30 13:34:33 +03:00
Vladislav Volkov c97bb90a91
Nested ITT counters lead to invalid performance measurement results (#5172)
* Compile time enabling or disabling of first inference time counters

* First inference time counters

* Counters for validate_nodes_and_infer_types and check_all_parameters_registered removed from first inference time counters scope

* Code style fix

* Missing macro for CC and invalid domain names

* Code style fix

* Unused function warnings fixed
2021-04-29 07:33:21 +03:00
Katarzyna Mitrus b3de228206
Transpose ngraph op and reference implementation revision (#5315)
* Extend single layer Transpose tests

* Add more Transpose backend tests

* Update Transpose reference implementation

* Use reference implementation in Transpose evaluate

* Add type prop test with interval dimension

* Move Transpose eval tests to separate file

* Update ie unit test manifest for dynamic cases

* Update evaluate default axes order calculation

* Add Transpose to summarize script

* Add serialize single layer tests

* Add axes order checks in evaluate

* Move ref function default args behaviour to legacy function

* Add new line at EOF

* Remove redundant transpose get_vector helper

* Add set_element_type in transpose evaluate

* Simplify vector convertion

* Add deprecation notice

* Add more tests

* Tests update

* Remove redundant reshape header

* Update unique axes check
2021-04-29 06:58:37 +03:00
Bartosz Lesniewski 39b4b65ffd
Fix Max and Average Pooling op behavior with ceil rounding (#5204)
* Fix Max and Avg Pooling behavior with ceil rounding

* Remove redundant code

* Add backend test to check the problematic case
2021-04-29 06:58:03 +03:00
Ilya Churaev 9d37403f89
Changed clang-format for nGraph to fix namespace comments (#5269)
* Changed clang-format for nGraph to fix namepace comments

* Update comments

* Fixed code style
2021-04-22 08:06:54 +03: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
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
Patryk Elszkowski 11990e50aa
Scatter nd update new reference implementation (#5003)
* Add more span util and test

* ScatterNdUpdate new reference implementation

* add ScatterNDUpdate-3 to verified_operations

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-04-13 14:26:50 +03:00
Bartosz Sledz 94e9b632e8
Revise ONNX Mod operator (Add support for attribute fmod == 0) (#5173) 2021-04-13 10:24:51 +02: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
Gabriele Galiero Casay 91a8de127d
Convolution group operations alignment (#4387)
* Convolution: Enhance dynamic shape inference of validate and infer types method

* Convolution: Change onnx test with dynamic shapes to float element type

* Convolution: Remove test instances with integer precision

* Convolution: Add backticks to types in spec

* Convolution: Change element type variable for output element type

* GroupConvolution: Add backticks to types in spec

* GroupConvolution: Enhance dynamic shape inference of validate and infer types method

* GroupConvolution: Remove serialization test instances with integer precision

* GroupConvolutionBackpropData: Remove serialization test instances with integer precision

* GroupConvolutionBackpropData: Enhance dynamic shape inference of validate and infer types method

* Convolution: Add helper function to validate convolution parameters in ref impl

* Convolution: Rewrite lambda to capture spatial dims of filters in validate and infer types

* GroupConvolution: Refactor reference implementation

* Remove call to old implementation of convolution using dilations
* Added validation method to validate shapes

* GroupConvolutionBackpropData: Add more type_prop unit test and refactor test names

* Convolution: Extended validation of convolution parameters in reference implementation

* GroupConvolution: Extended validation of group convolution parameters in reference implementation

* GroupConvolutionBackpropData: Add helper function to validate convolution backprop parameters in ref impl

* Clean up unnecessary lines

* BinaryConvolution: Use validate helper function from convolution ref impl

* Convolution: Refactor validate and infer types to improve readability

* BinaryConvolution: Refactor validate and infer types to improve readability

* Convolution: Add explicit tensor shape dims for inputs and outputs in spec

* BinaryConvolution: Add explicit tensor shape dims for inputs and outputs in spec

* GroupConvolution: Add explicit tensor shape dims for inputs and outputs in spec

* Add helper function to infer convolution forward output shape

* Convolution: Refactor validate and infer types to use helpers to infer output shape

* BinaryConvolution: Refactor validate and infer types to use helpers to infer output shape

* GroupConvolutionBackpropData: Fix formula to calculate output shape in validation functions

* Remove symbol to export convolution output shape inference function

* GroupConvolution: Add validation checks for input channels dim of data batch and filter shape

* GroupConvolutionBackpropData: clean up type prop tests

* Convolution: Change element type in onnx unit tests with dyn shapes and convolution nodes

* GroupConvolutionBackpropData: Correct layout of filters input

* GroupConvolution: Deduce groups from inputs shape during output shape inference

* Change spec supported types of convolution operations to any numeric type

* Revert "GroupConvolution: Remove serialization test instances with integer precision"

This reverts commit 781c2570d6.

* Revert "GroupConvolutionBackpropData: Remove serialization test instances with integer precision"

This reverts commit 9a6ac23968.

* Revert "Convolution: Remove test instances with integer precision"

This reverts commit 0b07052a62.

* Revert "Convolution: Change element type in onnx unit tests with dyn shapes and convolution nodes"

This reverts commit c9f5944b6b.

* Revert "Convolution: Change onnx test with dynamic shapes to float element type"

This reverts commit 1f4202b010.

* Allow integral types in validate and infer types method for convolution group of operations

* Add i32 precision in single layer tests for convolution group of operations

* BinaryConvolution: Fix shape of input and output tensors in spec

* Address nitpick comments
2021-04-06 14:36:12 +03:00
Patryk Elszkowski 60bd0178a4
Add more features to span and unit tests (#5002)
* Add more span util and test

* apply review suggestions

* add throw in at operator in span

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-04-02 14:47:35 +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
Ilya Lavrenov 8a3ff9aeae
Removed not needed suppressions for deprecated API in ngraph (#4992)
* Removed not needed suppressions for deprecated API in ngraph

* Fixed compilation with deprecated API in 3rd party with MSVC
2021-03-27 14:32:17 +03:00
Liubov Batanina 69b76f188c
Fixed transpose reference (#4688) 2021-03-26 16:27:47 +03:00
Patryk Elszkowski 961437895b
Pad reference implementation which use only CoordinateTransformBasic (#4845)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-03-26 11:46:29 +03:00
Edward Shogulin 26a4022672
[CPU] Erf JIT implementation (#3790) 2021-03-25 17:50:00 +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
Liubov Batanina a09218d2d7
Added float16 to gather_tree reference (#4917) 2021-03-24 06:14:54 +03:00
Katarzyna Mitrus b8f36ec354
MatMul reference implementation refactoring (#4671)
* MatMul backend tests

* Single layer tests

* Style apply

* Updaye IE_CPU manifest

* New dot implementation

* Use new dot in MatMul reference

* Fix output batch offset

* Style apply

* Relax tests tolerance

* Remove legacy dot reference file

* Remove usage of broadcast builder

* Add one more broadcast test

* Remove NGRAPH_SUPPRESS_DEPRECATED

* Style apply

* Few more MatMul single layer tests

* Update IE tests manifest

* Move variable declarations to inner loops

* Add const to variables

* Apply review suggestions

* Reuse vector for transposed and broadcasted data
2021-03-22 15:27:31 +03:00