From 87ddcce518b0d8cdacfdf9839bda411dab4a3012 Mon Sep 17 00:00:00 2001 From: Edward Shogulin Date: Fri, 16 Oct 2020 01:15:03 +0300 Subject: [PATCH] [LPT] tests enabling --- .../transformations/convert_nms4_test.cpp | 6 ++---- .../transformations/convert_topk3_test.cpp | 4 ++-- .../common_test_utils/ngraph_test_utils.cpp | 9 ++++++--- .../common_test_utils/ngraph_test_utils.hpp | 3 ++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/inference-engine/tests/functional/inference_engine/transformations/convert_nms4_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_nms4_test.cpp index 71ad99c5523043..a5eb5b50568351 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/convert_nms4_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/convert_nms4_test.cpp @@ -64,9 +64,7 @@ TEST(TransformationTests, ConvertNMS4ToNMSIEStatic) { ASSERT_TRUE(res.first) << res.second; } -// LPT to nGraph migration: temporary disabling unexpected not reproduced fails on CI: -// https://openvino-ci.intel.com/job/private-ci/job/ie/job/build-linux-ubuntu18_i386/478/ -TEST(TransformationTests, DISABLED_ConvertNMS4ToNMSIEDynamic1) { +TEST(TransformationTests, ConvertNMS4ToNMSIEDynamic1) { std::shared_ptr f(nullptr), f_ref(nullptr); { auto boxes = std::make_shared(element::f32, PartialShape::dynamic()); @@ -75,7 +73,7 @@ TEST(TransformationTests, DISABLED_ConvertNMS4ToNMSIEDynamic1) { auto iou_threshold = opset4::Constant::create(element::f32, Shape{}, {0.75}); auto score_threshold = opset4::Constant::create(element::f32, Shape{}, {0.7}); auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold, - opset4::NonMaxSuppression::BoxEncodingType::CORNER, true, element::i32); + opset4::NonMaxSuppression::BoxEncodingType::CORNER, true, element::i64); f = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); diff --git a/inference-engine/tests/functional/inference_engine/transformations/convert_topk3_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_topk3_test.cpp index b30c8f9a07cedf..f0bc980af13ecf 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/convert_topk3_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/convert_topk3_test.cpp @@ -126,7 +126,7 @@ TEST(TransformationTests, ConvertTopK3I64Output0) { } // check that the second output from the TopK-3 with I64 output indices is equal to the TopK-1 second output converted to I64 -TEST(TransformationTests, DISABLED_ConvertTopK3I64Output1) { +TEST(TransformationTests, ConvertTopK3I64Output1) { std::shared_ptr f(nullptr), f_ref(nullptr); { auto input = std::make_shared(ngraph::element::f32, ngraph::Shape{15, 20, 3}); @@ -153,7 +153,7 @@ TEST(TransformationTests, DISABLED_ConvertTopK3I64Output1) { f_ref = std::make_shared(ngraph::NodeVector{convert}, ngraph::ParameterVector{input}); } - auto res = compare_functions(f, f_ref); + auto res = compare_functions(f, f_ref, false, false, false, false); ASSERT_TRUE(res.first) << res.second; auto result_node_of_converted_f = f->get_output_op(0); diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp index 9832aaceb0fdfb..731c63f393ee2e 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp @@ -73,7 +73,8 @@ std::pair compare_functions( const std::shared_ptr& f2, const bool compareConstValues, const bool compareNames, - const bool compareRuntimeKeys) { + const bool compareRuntimeKeys, + const bool comparePrecisions) { /* * This function compares two nGraph functions and requires them to have exactly one output * + Check nodes types @@ -142,10 +143,12 @@ std::pair compare_functions( } } - if (node1->input(i).get_element_type() != node2->input(i).get_element_type()) { - err_log << "Different element type detected" << std::endl + if (comparePrecisions) { + if (node1->input(i).get_element_type() != node2->input(i).get_element_type()) { + err_log << "Different element type detected" << std::endl << node1->get_friendly_name() << " Input(" << i << ") " << node1->input(i).get_element_type() << " and " << node2->get_friendly_name() << " Input(" << i << ") " << node2->input(i).get_element_type() << std::endl; + } } if (!node1->input(i).get_partial_shape().same_scheme(node2->input(i).get_partial_shape())) { diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp index 99e00014b764a4..9dd31115ed376a 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp @@ -25,7 +25,8 @@ std::pair compare_functions( const std::shared_ptr& f2, const bool compareConstValues = false, const bool compareNames = false, - const bool compareRuntimeKeys = false); + const bool compareRuntimeKeys = false, + const bool comparePrecisions = true); void check_rt_info(const std::shared_ptr & f);