Skip to content

Commit

Permalink
Move gtest accert to ov_accert
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi committed Jun 25, 2024
1 parent 85f0599 commit 40dc2cb
Show file tree
Hide file tree
Showing 174 changed files with 1,163 additions and 1,127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ TEST_P(TransformationsAfterSplitTransformation, Run) {
SimpleLowPrecisionTransformer transformer;
getTransformerWithTransformationByName(transformer, params, layerName);

ASSERT_NO_THROW(transformer.transform(model));
OV_ASSERT_NO_THROW(transformer.transform(model));
}

const std::vector<std::string> transformationNames = {
Expand Down
2 changes: 1 addition & 1 deletion src/common/snippets/tests/src/lowering_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void LoweringTests::TearDown() {
model_ref = cloned_model;
}
manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

if (comparator.should_compare(FunctionsComparator::ACCURACY)) {
auto acc_comparator = FunctionsComparator::no_default();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TEST(TransformationTests, ConvToBinaryConvOutputLowZeroOutputHighOne) {
m.register_pass<ov::pass::ConvToBinaryConv>();
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -106,7 +106,7 @@ TEST(TransformationTests, ConvToBinaryConvOutputLowMinusOneOutputHighOne) {
m.register_pass<ov::pass::ConvToBinaryConv>();
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -163,7 +163,7 @@ TEST(TransformationTests, NegativeConvToBinaryConvInvalidWeights) {
m.register_pass<ov::pass::ConvToBinaryConv>();
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -216,7 +216,7 @@ TEST(TransformationTests, NegativeConvToBinaryConvInvalidLevels) {
m.register_pass<ov::pass::ConvToBinaryConv>();
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -269,7 +269,7 @@ TEST(TransformationTests, NegativeConvToBinaryConvOutputLowHigh) {
m.register_pass<ov::pass::ConvToBinaryConv>();
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TEST(TransformationTests, ConvertCompressionOnlyToLegacy) {
manager.register_pass<ov::pass::InitNodeInfo>();
manager.register_pass<ov::pass::ConvertCompressedOnlyToLegacy>();
manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -86,7 +86,7 @@ TEST(TransformationTests, ConvertCompressionOnlyToLegacyNoConvertion) {
manager.register_pass<ov::pass::InitNodeInfo>();
manager.register_pass<ov::pass::ConvertCompressedOnlyToLegacy>();
manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TEST(TransformationTests, ConvertConvertLike) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::ConvertConvertLike>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -62,7 +62,7 @@ TEST(TransformationTests, ConvertConvertLike2) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::ConvertConvertLike>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand All @@ -89,7 +89,7 @@ TEST(TransformationTests, ConvertConvertLike_Negative) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::ConvertConvertLike>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ TEST(TransformationTests, test_convert_to_unsigned_nms_gather_3) {
manager.register_pass<ov::pass::InitNodeInfo>();
manager.register_pass<ov::pass::ConvertNmsGatherPathToUnsigned>();
manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
ASSERT_EQ(count_ops_of_type<ov::op::v0::Convert>(f), 0);
}

Expand Down Expand Up @@ -260,7 +260,7 @@ TEST(TransformationTests, test_convert_to_unsigned_nms_gather_with_if_condition)
manager.register_pass<pass::InitNodeInfo>();
manager.register_pass<pass::ConvertNmsGatherPathToUnsigned>();
manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& ops = f->get_ops();
const auto& gather_it = find(ops.begin(), ops.end(), target_gather);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void positive_test(const Shape& data_shape,
m.register_pass<ov::pass::ConstantFolding>();
m.run_passes(f);

ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -229,7 +229,7 @@ void negative_test(const Shape& data_shape,
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::ConvertQuantizeDequantize>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_Transpose_and_Convolution) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(!shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -118,7 +118,7 @@ TEST(TransformationTests, AutoBatch_LabelPropagation_Convolution_Reshape) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand All @@ -144,7 +144,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_SingleMultiply) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -174,7 +174,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_Two_Outputs) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -204,7 +204,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_TwoOutputsReversed) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -238,7 +238,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_IndependentBranchesConcated) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -271,7 +271,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_TwoConvNetwork) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down Expand Up @@ -299,7 +299,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_NegativeTracking) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>(false, false);
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand All @@ -319,7 +319,7 @@ TEST(TransformationTests, AutoBatch_FindBatch_AutoBatch_LabelPropagation_DO_deta
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::FindBatch>(true);
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

const auto& shape = data->get_partial_shape();
ASSERT_TRUE(shape[0].get_symbol()) << shape;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST(TransformationTests, DivideFusion) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::DivideFusion>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down Expand Up @@ -67,7 +67,7 @@ TEST(TransformationTests, DivideFusionNegative) {
m.register_pass<ov::pass::InitNodeInfo>();
m.register_pass<ov::pass::DivideFusion>();
m.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ TEST_P(FQMulFusion, ExpectFusion) {
manager.register_pass<ov::pass::CheckUniqueNames>(unh);

manager.run_passes(m_model);
ASSERT_NO_THROW(check_rt_info(m_model));
OV_ASSERT_NO_THROW(check_rt_info(m_model));

auto fc =
FunctionsComparator::no_default().enable(FunctionsComparator::PRECISIONS).enable(FunctionsComparator::NODES);
Expand Down Expand Up @@ -219,7 +219,7 @@ TEST(FQMulFusion_NonConstInputs, AllInputsNonConst) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto res = compare_functions(model, expected_function);
ASSERT_TRUE(res.first) << res.second;
Expand Down Expand Up @@ -253,7 +253,7 @@ TEST(FQMulFusion_NonConstInputs, FQ_out_high_const) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto res = compare_functions(model, expected_function);
ASSERT_TRUE(res.first) << res.second;
Expand Down Expand Up @@ -286,7 +286,7 @@ TEST(FQMulFusion_FQ_Mul_inputs, FQ_out_to_mul_input_2) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto res = compare_functions(model, expected_function);
ASSERT_TRUE(res.first) << res.second;
Expand Down Expand Up @@ -320,7 +320,7 @@ TEST(FQMulFusion_FQ_Mul_inputs, FQ_out_to_mul_input_2_param) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto res = compare_functions(model, expected_function);
ASSERT_TRUE(res.first) << res.second;
Expand All @@ -346,7 +346,7 @@ TEST(TransformationTests, FakeQuantizeMultiplyFusionNegative) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

ASSERT_EQ(model->get_output_shape(0), Shape({1, 300, 16}));
}
Expand Down Expand Up @@ -379,7 +379,7 @@ TEST(TransformationTests, FakeQuantizeMultiplyFusionMulConstWithEqualValues) {
manager.register_pass<ov::pass::FakeQuantizeMulFusion>();

manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

const auto res = compare_functions(model, expected_function, true);
ASSERT_TRUE(res.first) << res.second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ TEST_P(FQReshapeFusionTests, ReshapeMatMul) {
manager.register_pass<ov::pass::CheckUniqueNames>(unh);

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));

auto fc =
FunctionsComparator::no_default().enable(FunctionsComparator::PRECISIONS).enable(FunctionsComparator::NODES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TEST(TransformationTests, FusedNamesCleanup) {
manager.register_pass<ov::pass::InitNodeInfo>();
manager.register_pass<ov::pass::ConstantFolding>();
manager.run_passes(model);
ASSERT_NO_THROW(check_rt_info(model));
OV_ASSERT_NO_THROW(check_rt_info(model));

manager.register_pass<ov::pass::FusedNamesCleanup>();
manager.run_passes(model);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ TEST(TransformationTests, LowLatency2_LSTM) {
manager.register_pass<ov::pass::InitNodeInfo>();
manager.register_pass<ov::pass::LowLatency2>();
manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -188,7 +188,7 @@ TEST(TransformationTests, LowLatency2_GRU) {

manager.run_passes(f);

ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -269,7 +269,7 @@ TEST(TransformationTests, LowLatency2_RNN) {

manager.run_passes(f);

ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -346,7 +346,7 @@ TEST(TransformationTests, LowLatency2_LSTMReshape) {
manager.register_pass<ov::pass::LowLatency2>();

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -431,7 +431,7 @@ TEST(TransformationTests, LowLatency2_LSTM_Loop) {
manager.register_pass<ov::pass::LowLatency2>();

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -510,7 +510,7 @@ TEST(TransformationTests, LowLatency2_LSTM_several_iterations) {
manager.register_pass<ov::pass::LowLatency2>();

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}

// TensorIterator not unrolled.
Expand Down Expand Up @@ -625,7 +625,7 @@ TEST(TransformationTests, LowLatency2_LSTM_Loop_Reshape) {
manager.register_pass<ov::pass::LowLatency2>();

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto Xi = std::make_shared<Parameter>(element::f32, Shape{1, 1, 16});
Expand Down Expand Up @@ -706,7 +706,7 @@ TEST(TransformationTests, LowLatency2_LSTM_Loop_several_iterations) {
manager.register_pass<ov::pass::LowLatency2>(true);

manager.run_passes(f);
ASSERT_NO_THROW(check_rt_info(f));
OV_ASSERT_NO_THROW(check_rt_info(f));
}
{
auto X = std::make_shared<Parameter>(element::f32, Shape{10, 1, 16});
Expand Down
Loading

0 comments on commit 40dc2cb

Please sign in to comment.