* Move evaluate() interface from some OPs to Interpreter * commit * Move shuffle channels reference to OP's evaluate * Add some operations missed in evaluate_node * Fix select references invocation from evaluate_node() * Activation refs (#2) * HardSigmoid * Elu * Selu * Gelu * Move to test runtime * Rollback donwgrade passes delition * Initial batch to space refs * Return opset1_upgrade * WIP: Add space to batch evaluate * Fix space to batch * add evaluates function in evaluates_map (#4) * Add space to batch evaluate * Fix crop in batch to space references * Remove vectors reallocation in evaluates for b2s and s2b * . * Add SpaceToDepth evaluate * Add depth to space evaluate * Remove code duplication depth to space evaluate * Fix some failed layer tests * Ngraph test (#3) * Remove some v0 ops & fix some tests * Fixes BatchNorm * Next * dd * s * Add dot & replace slice refs * d * dkj * Review fixes part 1 * Fixes. Part 2 * Fixes. Part 3 * Enable cells refs in evaluate map * Fix some failed layer tests * Some more fixes * Fix code style (#6) * Tests (#7) * PriorBox * Mod * NormilizeL2 * Update prior_box.hpp * Fix one hot ref call * . * Select (#8) * Select * Fix code style * Fix select messages * ReverseSeq (#9) * ReverseSeq * Select * ExtractImagePatches, Seqence * Fix Code Style * remove extra * Remove etra line@ * Add fake quantize reference * Align convolution layer tests instantiations with updated definition * Disabled some failed LPT tests * Disabled some failed LPT tests * Remove undesired changes * Update unit-test manifests + some code cleanup * Fix code style (#10) * Normalize L2 refs support (from PR #2327) * Fix code style * Apply review comments. Part 1 (#11) * Apply first part of review comments * Update onnx_import.in.cpp * Remove redundant reshape from shuffle_channels evaluate * Decompose GroupConvolution * [IE Ngraph] Fix some operation inheritance (#13) * [IE TESTS] Depth2Space * Space2Depth * ShuffleChannels * Fix ode style * Fix code style * [IE NGraph] Remove decompose op (#14) * . * Fix loosing control dependency in replace_node * Fix loosing control dependency in replace_node * Fix code style * Fix FQ references build on windows * Fix code style * Apply comments (#15) * [Ie Ngraph] Remove using v1::Add * [Ie Ngraph] Remove using v1::Mutliply * [Ie Ngraph] Remove using v1::Subtract * [Ie Ngraph] Remove using v1::Divide * [Ie Ngraph] Remove using v1::Equal * [Ie Ngraph] Remove using v1::Greater * [Ie Ngraph] Remove using v1::Greater_eq * [Ie Ngraph] Remove using v1::Less * [Ie Ngraph] Remove using v1::LessEq * [Ie Ngraph] Remove using operator+ * [Ie Ngraph] Remove using operator/ * [Ie Ngraph] Remove using operator* * [Ie Ngraph] Remove using operator- * Fix code style * Ci (#16) * Fix CentOS compilation * Revert ngraph::op::vo::Multiply removing due to OpenCV * Android fix (#17) * fix failures * Fix code style * Add (#18) * Android fix * Add * Add in opset1 upgrade pass * Add in opset1 upgrade pass * Remove v0::Add, Reverted removing v0::Multiply (#19) * Remove overloaded math operators from PyNgraph * Remove overloaded math operators from PyNgraph * Fix gna tests (#20) * Fix gna tests * Squashed commit of the following: commit565b504c1cAuthor: Alexander Zhogov <alexander.zhogov@intel.com> Date: Tue Oct 13 13:27:34 2020 +0300 GitHub CI: Add files_size.yml (#2570) * GitHub CI: Add files_size.yml * Update job name commitab0fb29853Author: Vladislav Vinogradov <vlad.vinogradov@intel.com> Date: Tue Oct 13 11:37:30 2020 +0300 [IE][BUILD] Fix C5208 warning under Windows (#2628) * C++ feature in C `typedef struct` code. * The warning can be promoted to error in dependent projects. C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes commit15a338e89bAuthor: helmutg <helmut@subdivi.de> Date: Mon Oct 12 22:24:24 2020 +0200 add build option USE_SYSTEM_PUGIXML (#2502) It allows skipping inference-engine/thirdparty/pugixml and using the system copy instead. Thanks to @Osse for helping understand cmake scoping rules. Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de> commit7ac8cd8586Author: Alexander Zhogov <alexander.zhogov@intel.com> Date: Mon Oct 12 19:23:00 2020 +0300 Azure CI: Fix nGraph ONNX commit3a2e33962cAuthor: Alexander Zhogov <alexander.zhogov@intel.com> Date: Mon Oct 12 19:20:28 2020 +0300 Azure CI: Disable steps in nGraph ONNX commit5835974fadAuthor: azhogov <alexander.zhogov@intel.com> Date: Mon Oct 12 18:46:14 2020 +0300 Azure CI: Add linux_ngraph_onnx.yml * LRN Reference (#21) * Disable failed tests on ia32 * Remove redundant broadcast from MVN ref * Fix missed GatherND in opset_int_tbl + code style * Remove one extra temporary buffer from MVN ref * Merge master (#22) * Leaky relu transformation refactor (#2640) * Refactored LeakyRelu transformation * Added unit test for LeakyRelu transformation + removed duplicate test function valued_const * nGraph implementation of NMS-5 (without `evaluate()`) (#2651) * Written nGraph NMS-5 without evaluate(). * Used NGRAPH_RTTI_DECLARATION. * setupvars.sh: Updated setting pyenv error to warning. (#2663) * Fix itt build (#2662) * Loop-5 operation specification (#2291) The Loop-5 operation specification * Time tests improvements (#2642) * Remove extra functions from run_timetest.py * Add `log.debug` of raw and aggregated statistics in run_timetest.py * Implement storing of models locally for test_timetest.py * Fixed CVS-35316 (#2072) * Extend MO for operation GatherND (#2540) * Extend MO for operation GatherND * Update documentation * Rename GatherNd.py to gathernd.py Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com> * Add hsigmoid op to ngraph (#2647) * [IE CLDNN] Fixes for GatherTree and ReverseSequence (#2660) * ReorgYolo reference implementation (#2384) * Align ReorgYolo to the spec (vector strides -> int stride) * ReorgYolo ref impl * ReorgYolo evaluate method * ReorgYolo tests * Tests update * Style apply * Add some coments * Code refactor * Comment update * Style apply * Build fix, mark evaluate as override * Revert "Align ReorgYolo to the spec (vector strides -> int stride)" * Use int_executable instead of evaluate * Use char* instead of templates * Code refactor * Comment update * Code review comment * Add constructor aligned with spec * Update shape validation * Update attributes tests * Add type_prop tests * Update backend tests * Add single layer tests * Update the spec * Remove wrong transformation test * Add ReorgYolo to evaluates_map * code style Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com> Co-authored-by: Vladimir Gavrilov <vladimir.gavrilov@intel.com> Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com> Co-authored-by: Andrey Somsikov <andrey.somsikov@intel.com> Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com> Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com> Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com> Co-authored-by: iliya mironov <iliya.mironov@intel.com> Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com> Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com> * RegionYolo * Apply review comments * Merge remote-tracking branch 'upstream/master' into update_evaluates # Conflicts: # ngraph/core/src/op/mvn.cpp # ngraph/test/backend/fused_op.in.cpp # ngraph/test/runtime/ie/unit_test.manifest # ngraph/test/runtime/interpreter/int_executable.hpp # ngraph/test/runtime/interpreter/opset_int_tbl.hpp # ngraph/test/runtime/interpreter/unit_test.manifest # ngraph/test/runtime/opset0_tbl.hpp * Apply code style * Apply comments * Apply code style * Fix RegionYolo evaluate redefinition * Removed defines from evaluates map * Apply code style * Fix MVN ref * rename select reference argument * Fix code style * Fix Fake Quantize references calculation (#24) * Fix MVN ref * Fix MVN & adding NMS * Fix TI * Temporary relax comparison threshold for FQ SLT * Fix GPU LPT Tests * Add explicit rounding mode seetting in FQ references * Apply code style * Rollback op_is test deletion * Apply code style * Fix merge conflict resolving issues * Apply code style Co-authored-by: Irina Efode <irina.efode@intel.com> Co-authored-by: Anton Zaytsev <anton.zaytsev@intel.com> Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com> Co-authored-by: Vladimir Gavrilov <vladimir.gavrilov@intel.com> Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com> Co-authored-by: Andrey Somsikov <andrey.somsikov@intel.com> Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com> Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com> Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com> Co-authored-by: iliya mironov <iliya.mironov@intel.com> Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com> Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
770 lines
27 KiB
C++
770 lines
27 KiB
C++
//*****************************************************************************
|
|
// Copyright 2017-2020 Intel Corporation
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//*****************************************************************************
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
#include "ngraph/ngraph.hpp"
|
|
#include "ngraph/op/util/op_types.hpp"
|
|
#include "ngraph/validation_util.hpp"
|
|
#include "op/convolution.hpp"
|
|
#include "op/group_conv.hpp"
|
|
#include "util/test_tools.hpp"
|
|
|
|
using namespace ngraph;
|
|
|
|
NGRAPH_SUPPRESS_DEPRECATED_START
|
|
|
|
namespace
|
|
{
|
|
void op_is_Abs()
|
|
{
|
|
op::Abs node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Acos()
|
|
{
|
|
op::Acos node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Asin()
|
|
{
|
|
op::Asin node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Atan()
|
|
{
|
|
op::Atan node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_AvgPool()
|
|
{
|
|
op::AvgPool node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_BatchNormInference()
|
|
{
|
|
op::v0::BatchNormInference node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Broadcast()
|
|
{
|
|
op::v1::Broadcast node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Ceiling()
|
|
{
|
|
op::Ceiling node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Clamp()
|
|
{
|
|
op::Clamp node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Concat()
|
|
{
|
|
op::Concat node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Constant()
|
|
{
|
|
op::Constant node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Convert()
|
|
{
|
|
op::Convert node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Convolution()
|
|
{
|
|
op::v0::Convolution node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ConvolutionBackpropData()
|
|
{
|
|
op::v0::ConvolutionBackpropData node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Cos()
|
|
{
|
|
op::Cos node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Cosh()
|
|
{
|
|
op::Cosh node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_CumSum()
|
|
{
|
|
op::CumSum node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_DepthToSpace()
|
|
{
|
|
op::DepthToSpace node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Elu()
|
|
{
|
|
op::Elu node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_EmbeddingBagOffsetsSum()
|
|
{
|
|
op::EmbeddingBagOffsetsSum node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_EmbeddingBagPackedSum()
|
|
{
|
|
op::EmbeddingBagPackedSum node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_EmbeddingSegmentsSum()
|
|
{
|
|
op::EmbeddingSegmentsSum node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Erf()
|
|
{
|
|
op::Erf node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Exp()
|
|
{
|
|
op::Exp node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ExtractImagePatches()
|
|
{
|
|
op::ExtractImagePatches node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_FakeQuantize()
|
|
{
|
|
op::FakeQuantize node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Floor()
|
|
{
|
|
op::Floor node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_GRN()
|
|
{
|
|
op::GRN node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_GRUCell()
|
|
{
|
|
op::v3::GRUCell node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Gather()
|
|
{
|
|
op::v1::Gather node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_GatherND()
|
|
{
|
|
op::v5::GatherND node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Gelu()
|
|
{
|
|
op::Gelu node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_GroupConvolution()
|
|
{
|
|
op::v0::GroupConvolution node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_GroupConvolutionBackpropData()
|
|
{
|
|
op::v0::GroupConvolutionBackpropData node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_HardSigmoid()
|
|
{
|
|
op::HardSigmoid node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Interpolate()
|
|
{
|
|
op::v0::Interpolate node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Log()
|
|
{
|
|
op::Log node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_LogicalOr()
|
|
{
|
|
op::v1::LogicalOr node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_TRUE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_LRN()
|
|
{
|
|
op::LRN node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_LSTMCell()
|
|
{
|
|
op::v4::LSTMCell node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_LSTMSequence()
|
|
{
|
|
op::v0::LSTMSequence node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_MatMul()
|
|
{
|
|
op::MatMul node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Multiply()
|
|
{
|
|
op::v0::Multiply node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_NormalizeL2()
|
|
{
|
|
op::NormalizeL2 node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_MVN()
|
|
{
|
|
op::MVN node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Negative()
|
|
{
|
|
op::Negative node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_OneHot()
|
|
{
|
|
op::v1::OneHot node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Parameter()
|
|
{
|
|
op::Parameter node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_PRelu()
|
|
{
|
|
op::PRelu node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_PriorBox()
|
|
{
|
|
op::PriorBox node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ReduceProd()
|
|
{
|
|
op::v1::ReduceProd node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Quantize()
|
|
{
|
|
op::Quantize node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Range()
|
|
{
|
|
op::Range node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ReduceSum()
|
|
{
|
|
op::v1::ReduceSum node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Relu()
|
|
{
|
|
op::Relu node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Reshape()
|
|
{
|
|
op::v1::Reshape node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Result()
|
|
{
|
|
op::Result node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Reverse()
|
|
{
|
|
op::v1::Reverse node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ReverseSequence()
|
|
{
|
|
op::ReverseSequence node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_RNNCell()
|
|
{
|
|
op::v0::RNNCell node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Round()
|
|
{
|
|
op::v5::Round node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Selu()
|
|
{
|
|
op::Selu node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ShapeOf()
|
|
{
|
|
op::ShapeOf node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_ShuffleChannels()
|
|
{
|
|
op::ShuffleChannels node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Sigmoid()
|
|
{
|
|
op::Sigmoid node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Sign()
|
|
{
|
|
op::Sign node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Sin()
|
|
{
|
|
op::Sin node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Sinh()
|
|
{
|
|
op::Sinh node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Softmax()
|
|
{
|
|
op::v1::Softmax node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_SpaceToDepth()
|
|
{
|
|
op::SpaceToDepth node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Split()
|
|
{
|
|
op::v1::Split node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Sqrt()
|
|
{
|
|
op::Sqrt node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_SquaredDifference()
|
|
{
|
|
op::SquaredDifference node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Squeeze()
|
|
{
|
|
op::Squeeze node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Tan()
|
|
{
|
|
op::Tan node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Tanh()
|
|
{
|
|
op::Tanh node;
|
|
EXPECT_TRUE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_TensorIterator()
|
|
{
|
|
op::TensorIterator node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Tile()
|
|
{
|
|
op::v0::Tile node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_TopK()
|
|
{
|
|
op::v1::TopK node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Unsqueeze()
|
|
{
|
|
op::v0::Unsqueeze node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
|
|
void op_is_Xor()
|
|
{
|
|
op::Xor node;
|
|
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
|
|
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
|
|
EXPECT_TRUE(op::is_binary_elementwise_logical(&node));
|
|
}
|
|
} // namespace
|
|
|
|
TEST(op_is, check)
|
|
{
|
|
NGRAPH_SUPPRESS_DEPRECATED_START
|
|
#define NGRAPH_OP(a, b) op_is_##a();
|
|
#include "opset0_tbl.hpp"
|
|
#undef NGRAPH_OP
|
|
NGRAPH_SUPPRESS_DEPRECATED_END
|
|
}
|