Refactor common_test_utils (#18693)

* Refactor common_test_utils

* Apply comments
This commit is contained in:
Oleg Pipikin
2023-07-24 21:23:42 +02:00
committed by GitHub
parent 42237bcbdb
commit bf4a2a462a
94 changed files with 1459 additions and 1578 deletions

View File

@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "common_test_utils/all_close_f.hpp"
#include "common_test_utils/test_tools.hpp"
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"

View File

@@ -7,7 +7,6 @@
#include <string>
#include <vector>
#include "common_test_utils/all_close_f.hpp"
#include "common_test_utils/ndarray.hpp"
#include "common_test_utils/test_assertions.hpp"
#include "common_test_utils/test_tools.hpp"

View File

@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "common_test_utils/all_close_f.hpp"
#include "common_test_utils/test_tools.hpp"
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"

View File

@@ -14,143 +14,143 @@
# define _OPENVINO_OP_REG(x, y)
#endif
_OPENVINO_OP_REG(Abs, ngraph::op::v0)
_OPENVINO_OP_REG(Acos, ngraph::op::v0)
_OPENVINO_OP_REG(Acosh, ngraph::op::v3)
_OPENVINO_OP_REG(Add, ngraph::op::v1)
_OPENVINO_OP_REG(Asin, ngraph::op::v0)
_OPENVINO_OP_REG(Asinh, ngraph::op::v3)
_OPENVINO_OP_REG(Atan, ngraph::op::v0)
_OPENVINO_OP_REG(Atanh, ngraph::op::v3)
_OPENVINO_OP_REG(AvgPool, ngraph::op::v1)
_OPENVINO_OP_REG(BatchNormInference, ngraph::op::v0)
_OPENVINO_OP_REG(BatchToSpace, ngraph::op::v1)
_OPENVINO_OP_REG(BinaryConvolution, ngraph::op::v1)
_OPENVINO_OP_REG(Broadcast, ngraph::op::v1)
_OPENVINO_OP_REG(Broadcast, ngraph::op::v3)
_OPENVINO_OP_REG(Bucketize, ngraph::op::v3)
_OPENVINO_OP_REG(CTCGreedyDecoder, ngraph::op::v0)
_OPENVINO_OP_REG(Ceiling, ngraph::op::v0)
_OPENVINO_OP_REG(Clamp, ngraph::op::v0)
_OPENVINO_OP_REG(Concat, ngraph::op::v0)
_OPENVINO_OP_REG(Constant, ngraph::op::v0)
_OPENVINO_OP_REG(Convert, ngraph::op::v0)
_OPENVINO_OP_REG(ConvertLike, ngraph::op::v1)
_OPENVINO_OP_REG(Convolution, ngraph::op::v1)
_OPENVINO_OP_REG(ConvolutionBackpropData, ngraph::op::v1)
_OPENVINO_OP_REG(Cos, ngraph::op::v0)
_OPENVINO_OP_REG(Cosh, ngraph::op::v0)
_OPENVINO_OP_REG(CumSum, ngraph::op::v0)
_OPENVINO_OP_REG(DeformableConvolution, ngraph::op::v1)
_OPENVINO_OP_REG(DeformablePSROIPooling, ngraph::op::v1)
_OPENVINO_OP_REG(DepthToSpace, ngraph::op::v0)
_OPENVINO_OP_REG(DetectionOutput, ngraph::op::v0)
_OPENVINO_OP_REG(Divide, ngraph::op::v1)
_OPENVINO_OP_REG(Elu, ngraph::op::v0)
_OPENVINO_OP_REG(EmbeddingBagOffsetsSum, ngraph::op::v3)
_OPENVINO_OP_REG(EmbeddingBagPackedSum, ngraph::op::v3)
_OPENVINO_OP_REG(EmbeddingSegmentsSum, ngraph::op::v3)
_OPENVINO_OP_REG(Equal, ngraph::op::v1)
_OPENVINO_OP_REG(Erf, ngraph::op::v0)
_OPENVINO_OP_REG(Exp, ngraph::op::v0)
_OPENVINO_OP_REG(ExtractImagePatches, ngraph::op::v3)
_OPENVINO_OP_REG(FakeQuantize, ngraph::op::v0)
_OPENVINO_OP_REG(Floor, ngraph::op::v0)
_OPENVINO_OP_REG(FloorMod, ngraph::op::v1)
_OPENVINO_OP_REG(GRN, ngraph::op::v0)
_OPENVINO_OP_REG(GRUCell, ngraph::op::v3)
_OPENVINO_OP_REG(Gather, ngraph::op::v1)
_OPENVINO_OP_REG(GatherND, ngraph::op::v5)
_OPENVINO_OP_REG(GatherTree, ngraph::op::v1)
_OPENVINO_OP_REG(Gelu, ngraph::op::v0)
_OPENVINO_OP_REG(Greater, ngraph::op::v1)
_OPENVINO_OP_REG(GreaterEqual, ngraph::op::v1)
_OPENVINO_OP_REG(GroupConvolution, ngraph::op::v1)
_OPENVINO_OP_REG(GroupConvolutionBackpropData, ngraph::op::v1)
_OPENVINO_OP_REG(Abs, ov::op::v0)
_OPENVINO_OP_REG(Acos, ov::op::v0)
_OPENVINO_OP_REG(Acosh, ov::op::v3)
_OPENVINO_OP_REG(Add, ov::op::v1)
_OPENVINO_OP_REG(Asin, ov::op::v0)
_OPENVINO_OP_REG(Asinh, ov::op::v3)
_OPENVINO_OP_REG(Atan, ov::op::v0)
_OPENVINO_OP_REG(Atanh, ov::op::v3)
_OPENVINO_OP_REG(AvgPool, ov::op::v1)
_OPENVINO_OP_REG(BatchNormInference, ov::op::v0)
_OPENVINO_OP_REG(BatchToSpace, ov::op::v1)
_OPENVINO_OP_REG(BinaryConvolution, ov::op::v1)
_OPENVINO_OP_REG(Broadcast, ov::op::v1)
_OPENVINO_OP_REG(Broadcast, ov::op::v3)
_OPENVINO_OP_REG(Bucketize, ov::op::v3)
_OPENVINO_OP_REG(CTCGreedyDecoder, ov::op::v0)
_OPENVINO_OP_REG(Ceiling, ov::op::v0)
_OPENVINO_OP_REG(Clamp, ov::op::v0)
_OPENVINO_OP_REG(Concat, ov::op::v0)
_OPENVINO_OP_REG(Constant, ov::op::v0)
_OPENVINO_OP_REG(Convert, ov::op::v0)
_OPENVINO_OP_REG(ConvertLike, ov::op::v1)
_OPENVINO_OP_REG(Convolution, ov::op::v1)
_OPENVINO_OP_REG(ConvolutionBackpropData, ov::op::v1)
_OPENVINO_OP_REG(Cos, ov::op::v0)
_OPENVINO_OP_REG(Cosh, ov::op::v0)
_OPENVINO_OP_REG(CumSum, ov::op::v0)
_OPENVINO_OP_REG(DeformableConvolution, ov::op::v1)
_OPENVINO_OP_REG(DeformablePSROIPooling, ov::op::v1)
_OPENVINO_OP_REG(DepthToSpace, ov::op::v0)
_OPENVINO_OP_REG(DetectionOutput, ov::op::v0)
_OPENVINO_OP_REG(Divide, ov::op::v1)
_OPENVINO_OP_REG(Elu, ov::op::v0)
_OPENVINO_OP_REG(EmbeddingBagOffsetsSum, ov::op::v3)
_OPENVINO_OP_REG(EmbeddingBagPackedSum, ov::op::v3)
_OPENVINO_OP_REG(EmbeddingSegmentsSum, ov::op::v3)
_OPENVINO_OP_REG(Equal, ov::op::v1)
_OPENVINO_OP_REG(Erf, ov::op::v0)
_OPENVINO_OP_REG(Exp, ov::op::v0)
_OPENVINO_OP_REG(ExtractImagePatches, ov::op::v3)
_OPENVINO_OP_REG(FakeQuantize, ov::op::v0)
_OPENVINO_OP_REG(Floor, ov::op::v0)
_OPENVINO_OP_REG(FloorMod, ov::op::v1)
_OPENVINO_OP_REG(GRN, ov::op::v0)
_OPENVINO_OP_REG(GRUCell, ov::op::v3)
_OPENVINO_OP_REG(Gather, ov::op::v1)
_OPENVINO_OP_REG(GatherND, ov::op::v5)
_OPENVINO_OP_REG(GatherTree, ov::op::v1)
_OPENVINO_OP_REG(Gelu, ov::op::v0)
_OPENVINO_OP_REG(Greater, ov::op::v1)
_OPENVINO_OP_REG(GreaterEqual, ov::op::v1)
_OPENVINO_OP_REG(GroupConvolution, ov::op::v1)
_OPENVINO_OP_REG(GroupConvolutionBackpropData, ov::op::v1)
_OPENVINO_OP_REG(GroupNormalization, ov::op::v12)
_OPENVINO_OP_REG(HardSigmoid, ngraph::op::v0)
_OPENVINO_OP_REG(Interpolate, ngraph::op::v0)
_OPENVINO_OP_REG(Interpolate, ngraph::op::v4)
_OPENVINO_OP_REG(LRN, ngraph::op::v0)
_OPENVINO_OP_REG(LSTMCell, ngraph::op::v0)
_OPENVINO_OP_REG(LSTMSequence, ngraph::op::v0)
_OPENVINO_OP_REG(Less, ngraph::op::v1)
_OPENVINO_OP_REG(LessEqual, ngraph::op::v1)
_OPENVINO_OP_REG(Log, ngraph::op::v0)
_OPENVINO_OP_REG(LogicalAnd, ngraph::op::v1)
_OPENVINO_OP_REG(LogicalNot, ngraph::op::v1)
_OPENVINO_OP_REG(LogicalOr, ngraph::op::v1)
_OPENVINO_OP_REG(LogicalXor, ngraph::op::v1)
_OPENVINO_OP_REG(MVN, ngraph::op::v0)
_OPENVINO_OP_REG(MatMul, ngraph::op::v0)
_OPENVINO_OP_REG(MaxPool, ngraph::op::v1)
_OPENVINO_OP_REG(Maximum, ngraph::op::v1)
_OPENVINO_OP_REG(Minimum, ngraph::op::v1)
_OPENVINO_OP_REG(Mod, ngraph::op::v1)
_OPENVINO_OP_REG(Multiply, ngraph::op::v1)
_OPENVINO_OP_REG(Negative, ngraph::op::v0)
_OPENVINO_OP_REG(NonMaxSuppression, ngraph::op::v1)
_OPENVINO_OP_REG(NonMaxSuppression, ngraph::op::v3)
_OPENVINO_OP_REG(NonZero, ngraph::op::v3)
_OPENVINO_OP_REG(NormalizeL2, ngraph::op::v0)
_OPENVINO_OP_REG(NotEqual, ngraph::op::v1)
_OPENVINO_OP_REG(OneHot, ngraph::op::v1)
_OPENVINO_OP_REG(PRelu, ngraph::op::v0)
_OPENVINO_OP_REG(PSROIPooling, ngraph::op::v0)
_OPENVINO_OP_REG(Pad, ngraph::op::v1)
_OPENVINO_OP_REG(Pad, ngraph::op::v12)
_OPENVINO_OP_REG(Parameter, ngraph::op::v0)
_OPENVINO_OP_REG(Power, ngraph::op::v1)
_OPENVINO_OP_REG(PriorBox, ngraph::op::v0)
_OPENVINO_OP_REG(PriorBoxClustered, ngraph::op::v0)
_OPENVINO_OP_REG(Proposal, ngraph::op::v0)
_OPENVINO_OP_REG(RNNCell, ngraph::op::v0)
_OPENVINO_OP_REG(ROIPooling, ngraph::op::v0)
_OPENVINO_OP_REG(Range, ngraph::op::v0)
_OPENVINO_OP_REG(ReduceMax, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceLogicalAnd, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceLogicalOr, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceMean, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceMin, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceProd, ngraph::op::v1)
_OPENVINO_OP_REG(ReduceSum, ngraph::op::v1)
_OPENVINO_OP_REG(RegionYolo, ngraph::op::v0)
_OPENVINO_OP_REG(Relu, ngraph::op::v0)
_OPENVINO_OP_REG(ReorgYolo, ngraph::op::v0)
_OPENVINO_OP_REG(Reshape, ngraph::op::v1)
_OPENVINO_OP_REG(Result, ngraph::op::v0)
_OPENVINO_OP_REG(Reverse, ngraph::op::v1)
_OPENVINO_OP_REG(ReverseSequence, ngraph::op::v0)
_OPENVINO_OP_REG(Round, ngraph::op::v5)
_OPENVINO_OP_REG(ROIAlign, ngraph::op::v3)
_OPENVINO_OP_REG(ScatterElementsUpdate, ngraph::op::v3)
_OPENVINO_OP_REG(ScatterUpdate, ngraph::op::v3)
_OPENVINO_OP_REG(Select, ngraph::op::v1)
_OPENVINO_OP_REG(Selu, ngraph::op::v0)
_OPENVINO_OP_REG(ShapeOf, ngraph::op::v0)
_OPENVINO_OP_REG(ShapeOf, ngraph::op::v3)
_OPENVINO_OP_REG(ShuffleChannels, ngraph::op::v0)
_OPENVINO_OP_REG(Sigmoid, ngraph::op::v0)
_OPENVINO_OP_REG(Sign, ngraph::op::v0)
_OPENVINO_OP_REG(Sin, ngraph::op::v0)
_OPENVINO_OP_REG(Sinh, ngraph::op::v0)
_OPENVINO_OP_REG(Softmax, ngraph::op::v1)
_OPENVINO_OP_REG(SpaceToBatch, ngraph::op::v1)
_OPENVINO_OP_REG(SpaceToDepth, ngraph::op::v0)
_OPENVINO_OP_REG(Split, ngraph::op::v1)
_OPENVINO_OP_REG(Sqrt, ngraph::op::v0)
_OPENVINO_OP_REG(SquaredDifference, ngraph::op::v0)
_OPENVINO_OP_REG(Squeeze, ngraph::op::v0)
_OPENVINO_OP_REG(StridedSlice, ngraph::op::v1)
_OPENVINO_OP_REG(Subtract, ngraph::op::v1)
_OPENVINO_OP_REG(Tan, ngraph::op::v0)
_OPENVINO_OP_REG(Tanh, ngraph::op::v0)
_OPENVINO_OP_REG(TensorIterator, ngraph::op::v0)
_OPENVINO_OP_REG(Tile, ngraph::op::v0)
_OPENVINO_OP_REG(TopK, ngraph::op::v1)
_OPENVINO_OP_REG(Transpose, ngraph::op::v1)
_OPENVINO_OP_REG(Unsqueeze, ngraph::op::v0)
_OPENVINO_OP_REG(VariadicSplit, ngraph::op::v1)
_OPENVINO_OP_REG(Xor, ngraph::op::v0)
_OPENVINO_OP_REG(Assign, ngraph::op::v3)
_OPENVINO_OP_REG(ReadValue, ngraph::op::v3)
_OPENVINO_OP_REG(HardSigmoid, ov::op::v0)
_OPENVINO_OP_REG(Interpolate, ov::op::v0)
_OPENVINO_OP_REG(Interpolate, ov::op::v4)
_OPENVINO_OP_REG(LRN, ov::op::v0)
_OPENVINO_OP_REG(LSTMCell, ov::op::v0)
_OPENVINO_OP_REG(LSTMSequence, ov::op::v0)
_OPENVINO_OP_REG(Less, ov::op::v1)
_OPENVINO_OP_REG(LessEqual, ov::op::v1)
_OPENVINO_OP_REG(Log, ov::op::v0)
_OPENVINO_OP_REG(LogicalAnd, ov::op::v1)
_OPENVINO_OP_REG(LogicalNot, ov::op::v1)
_OPENVINO_OP_REG(LogicalOr, ov::op::v1)
_OPENVINO_OP_REG(LogicalXor, ov::op::v1)
_OPENVINO_OP_REG(MVN, ov::op::v0)
_OPENVINO_OP_REG(MatMul, ov::op::v0)
_OPENVINO_OP_REG(MaxPool, ov::op::v1)
_OPENVINO_OP_REG(Maximum, ov::op::v1)
_OPENVINO_OP_REG(Minimum, ov::op::v1)
_OPENVINO_OP_REG(Mod, ov::op::v1)
_OPENVINO_OP_REG(Multiply, ov::op::v1)
_OPENVINO_OP_REG(Negative, ov::op::v0)
_OPENVINO_OP_REG(NonMaxSuppression, ov::op::v1)
_OPENVINO_OP_REG(NonMaxSuppression, ov::op::v3)
_OPENVINO_OP_REG(NonZero, ov::op::v3)
_OPENVINO_OP_REG(NormalizeL2, ov::op::v0)
_OPENVINO_OP_REG(NotEqual, ov::op::v1)
_OPENVINO_OP_REG(OneHot, ov::op::v1)
_OPENVINO_OP_REG(PRelu, ov::op::v0)
_OPENVINO_OP_REG(PSROIPooling, ov::op::v0)
_OPENVINO_OP_REG(Pad, ov::op::v1)
_OPENVINO_OP_REG(Pad, ov::op::v12)
_OPENVINO_OP_REG(Parameter, ov::op::v0)
_OPENVINO_OP_REG(Power, ov::op::v1)
_OPENVINO_OP_REG(PriorBox, ov::op::v0)
_OPENVINO_OP_REG(PriorBoxClustered, ov::op::v0)
_OPENVINO_OP_REG(Proposal, ov::op::v0)
_OPENVINO_OP_REG(RNNCell, ov::op::v0)
_OPENVINO_OP_REG(ROIPooling, ov::op::v0)
_OPENVINO_OP_REG(Range, ov::op::v0)
_OPENVINO_OP_REG(ReduceMax, ov::op::v1)
_OPENVINO_OP_REG(ReduceLogicalAnd, ov::op::v1)
_OPENVINO_OP_REG(ReduceLogicalOr, ov::op::v1)
_OPENVINO_OP_REG(ReduceMean, ov::op::v1)
_OPENVINO_OP_REG(ReduceMin, ov::op::v1)
_OPENVINO_OP_REG(ReduceProd, ov::op::v1)
_OPENVINO_OP_REG(ReduceSum, ov::op::v1)
_OPENVINO_OP_REG(RegionYolo, ov::op::v0)
_OPENVINO_OP_REG(Relu, ov::op::v0)
_OPENVINO_OP_REG(ReorgYolo, ov::op::v0)
_OPENVINO_OP_REG(Reshape, ov::op::v1)
_OPENVINO_OP_REG(Result, ov::op::v0)
_OPENVINO_OP_REG(Reverse, ov::op::v1)
_OPENVINO_OP_REG(ReverseSequence, ov::op::v0)
_OPENVINO_OP_REG(Round, ov::op::v5)
_OPENVINO_OP_REG(ROIAlign, ov::op::v3)
_OPENVINO_OP_REG(ScatterElementsUpdate, ov::op::v3)
_OPENVINO_OP_REG(ScatterUpdate, ov::op::v3)
_OPENVINO_OP_REG(Select, ov::op::v1)
_OPENVINO_OP_REG(Selu, ov::op::v0)
_OPENVINO_OP_REG(ShapeOf, ov::op::v0)
_OPENVINO_OP_REG(ShapeOf, ov::op::v3)
_OPENVINO_OP_REG(ShuffleChannels, ov::op::v0)
_OPENVINO_OP_REG(Sigmoid, ov::op::v0)
_OPENVINO_OP_REG(Sign, ov::op::v0)
_OPENVINO_OP_REG(Sin, ov::op::v0)
_OPENVINO_OP_REG(Sinh, ov::op::v0)
_OPENVINO_OP_REG(Softmax, ov::op::v1)
_OPENVINO_OP_REG(SpaceToBatch, ov::op::v1)
_OPENVINO_OP_REG(SpaceToDepth, ov::op::v0)
_OPENVINO_OP_REG(Split, ov::op::v1)
_OPENVINO_OP_REG(Sqrt, ov::op::v0)
_OPENVINO_OP_REG(SquaredDifference, ov::op::v0)
_OPENVINO_OP_REG(Squeeze, ov::op::v0)
_OPENVINO_OP_REG(StridedSlice, ov::op::v1)
_OPENVINO_OP_REG(Subtract, ov::op::v1)
_OPENVINO_OP_REG(Tan, ov::op::v0)
_OPENVINO_OP_REG(Tanh, ov::op::v0)
_OPENVINO_OP_REG(TensorIterator, ov::op::v0)
_OPENVINO_OP_REG(Tile, ov::op::v0)
_OPENVINO_OP_REG(TopK, ov::op::v1)
_OPENVINO_OP_REG(Transpose, ov::op::v1)
_OPENVINO_OP_REG(Unsqueeze, ov::op::v0)
_OPENVINO_OP_REG(VariadicSplit, ov::op::v1)
_OPENVINO_OP_REG(Xor, ov::op::v0)
_OPENVINO_OP_REG(Assign, ov::op::v3)
_OPENVINO_OP_REG(ReadValue, ov::op::v3)

View File

@@ -2,15 +2,15 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "common_test_utils/all_close_f.hpp"
#include "common_test_utils/test_tools.hpp"
#include "gtest/gtest.h"
#include "ngraph/node.hpp"
#include "openvino/op/op.hpp"
using namespace ngraph;
using namespace std;
class OpType : public ngraph::op::Op {
class OpType : public ov::op::Op {
public:
OPENVINO_OP("OpType");
OpType() = default;
@@ -20,7 +20,7 @@ public:
}
};
class OpTypeVersion : public ngraph::op::Op {
class OpTypeVersion : public ov::op::Op {
public:
OPENVINO_OP("OpTypeVersion", "my_version");
OpTypeVersion() = default;
@@ -58,7 +58,7 @@ TEST(rtti, op_with_type) {
ASSERT_EQ(strcmp(type_info.name, "OpType"), 0);
ASSERT_EQ(strcmp(type_info.version_id, "extension"), 0);
ASSERT_NE(type_info.parent, nullptr);
ASSERT_EQ(*type_info.parent, ngraph::op::Op::get_type_info_static());
ASSERT_EQ(*type_info.parent, ov::op::Op::get_type_info_static());
}
TEST(rtti, op_with_type_version) {
@@ -68,7 +68,7 @@ TEST(rtti, op_with_type_version) {
ASSERT_EQ(strcmp(type_info.name, "OpTypeVersion"), 0);
ASSERT_EQ(strcmp(type_info.version_id, "my_version"), 0);
ASSERT_NE(type_info.parent, nullptr);
ASSERT_EQ(*type_info.parent, ngraph::op::Op::get_type_info_static());
ASSERT_EQ(*type_info.parent, ov::op::Op::get_type_info_static());
}
TEST(rtti, op_with_type_version_parent) {

View File

@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "common_test_utils/all_close_f.hpp"
#include "common_test_utils/test_tools.hpp"
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::Abs, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Abs, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::Acos, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Acos, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::Acosh, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v3::Acosh, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -5,6 +5,6 @@
#include "binary_ops.hpp"
#include "ngraph/opsets/opset1.hpp"
using Type = ::testing::Types<BinaryOperatorType<ngraph::opset1::Add, ngraph::element::f32>>;
using Type = ::testing::Types<BinaryOperatorType<ov::op::v1::Add, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_with_auto_broadcast, BinaryOperatorVisitor, Type, BinaryOperatorTypeName);

View File

@@ -3,6 +3,6 @@
//
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::Asin, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Asin, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -3,6 +3,6 @@
//
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::Asinh, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v3::Asinh, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Atan, ngraph::element::f32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Atan, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v3::Atanh, ngraph::element::f32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v3::Atanh, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Ceiling, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Ceiling, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Cos, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Cos, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Cosh, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Cosh, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -2,6 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "openvino/op/detection_output.hpp"
#include "common_test_utils/visitor.hpp"
#include "gtest/gtest.h"
#include "openvino/op/util/attr_types.hpp"
@@ -53,21 +55,25 @@ void is_equal_attrs(const DetectionOutputBase::AttributesBase& attrs1,
} // namespace
TEST(attributes, detection_output_op) {
NodeBuilder::get_ops().register_factory<op::v0::DetectionOutput>();
NodeBuilder::get_ops().register_factory<ov::op::v0::DetectionOutput>();
const auto box_logits = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 1 * 4});
const auto class_preds = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 32});
const auto proposals = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2, 2 * 4});
const auto aux_class_preds = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 2});
const auto aux_box_pred = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 1 * 4});
op::v0::DetectionOutput::Attributes attrs;
ov::op::v0::DetectionOutput::Attributes attrs;
initialize_attributes(attrs);
attrs.num_classes = 32;
auto detection_output =
make_shared<op::v0::DetectionOutput>(box_logits, class_preds, proposals, aux_class_preds, aux_box_pred, attrs);
auto detection_output = make_shared<ov::op::v0::DetectionOutput>(box_logits,
class_preds,
proposals,
aux_class_preds,
aux_box_pred,
attrs);
NodeBuilder builder(detection_output, {box_logits, class_preds, proposals, aux_class_preds, aux_box_pred});
auto g_detection_output = ov::as_type_ptr<op::v0::DetectionOutput>(builder.create());
auto g_detection_output = ov::as_type_ptr<ov::op::v0::DetectionOutput>(builder.create());
const auto do_attrs = detection_output->get_attrs();
const auto g_do_attrs = g_detection_output->get_attrs();
@@ -78,14 +84,14 @@ TEST(attributes, detection_output_op) {
// ------------------------------ V8 ------------------------------
TEST(attributes, detection_output_v8) {
NodeBuilder::get_ops().register_factory<op::v8::DetectionOutput>();
NodeBuilder::get_ops().register_factory<ov::op::v8::DetectionOutput>();
const auto box_logits = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 1 * 4});
const auto class_preds = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 32});
const auto proposals = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2, 2 * 4});
const auto aux_class_preds = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 2});
const auto aux_box_pred = make_shared<op::v0::Parameter>(element::f32, Shape{1, 2 * 1 * 4});
op::v8::DetectionOutput::Attributes attrs;
ov::op::v8::DetectionOutput::Attributes attrs;
initialize_attributes(attrs);
auto detection_output =

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Erf, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Erf, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Exp, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Exp, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Floor, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Floor, ngraph::element::f16>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Floor, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Floor, ngraph::element::f16>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v5::HSigmoid, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v5::HSigmoid, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v4::HSwish, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v4::HSwish, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Log, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Log, ngraph::element::f16>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Log, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Log, ngraph::element::f16>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v1::LogicalNot, ngraph::element::boolean>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v1::LogicalNot, ngraph::element::boolean>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Negative, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Negative, ngraph::element::i32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Negative, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Negative, ngraph::element::i32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v4::ReduceL1, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v4::ReduceL1, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v4::ReduceL2, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v4::ReduceL2, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceLogicalAnd, ngraph::element::boolean>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceLogicalAnd, ngraph::element::boolean>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceLogicalOr, ngraph::element::boolean>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceLogicalOr, ngraph::element::boolean>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceMax, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceMax, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceMean, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceMean, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceMin, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceMin, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceProd, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceProd, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,5 +4,5 @@
#include "reduce_ops.hpp"
using Type = ::testing::Types<ReduceOperatorType<ngraph::op::v1::ReduceSum, ngraph::element::f32>>;
using Type = ::testing::Types<ReduceOperatorType<ov::op::v1::ReduceSum, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(attributes_reduce_op, ReduceOperatorVisitor, Type, ReduceOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Relu, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Relu, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Result, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Result, ngraph::element::f16>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Result, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Result, ngraph::element::f16>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Sigmoid, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Sigmoid, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Sign, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Sign, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Sin, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Sin, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Sinh, ngraph::element::f32>>;
using Type = ::testing::Types<UnaryOperatorType<ov::op::v0::Sinh, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v4::SoftPlus, ngraph::element::f32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v4::SoftPlus, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v9::SoftSign, ngraph::element::f32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v9::SoftSign, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Sqrt, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Sqrt, ngraph::element::f16>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Sqrt, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Sqrt, ngraph::element::f16>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,7 +4,7 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Squeeze, ngraph::element::f32>,
UnaryOperatorType<ngraph::op::v0::Squeeze, ngraph::element::f16>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Squeeze, ngraph::element::f32>,
UnaryOperatorType<ov::op::v0::Squeeze, ngraph::element::f16>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);

View File

@@ -4,6 +4,6 @@
#include "unary_ops.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Tan, ngraph::element::f32>>;
using Types = ::testing::Types<UnaryOperatorType<ov::op::v0::Tan, ngraph::element::f32>>;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);