Skip to content

Commit

Permalink
[LPT] tests enabling
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Oct 15, 2020
1 parent 985aed7 commit 87ddcce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Function> f(nullptr), f_ref(nullptr);
{
auto boxes = std::make_shared<opset4::Parameter>(element::f32, PartialShape::dynamic());
Expand All @@ -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<opset4::NonMaxSuppression>(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<Function>(NodeVector{nms}, ParameterVector{boxes, scores});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ngraph::Function> f(nullptr), f_ref(nullptr);
{
auto input = std::make_shared<ngraph::opset3::Parameter>(ngraph::element::f32, ngraph::Shape{15, 20, 3});
Expand All @@ -153,7 +153,7 @@ TEST(TransformationTests, DISABLED_ConvertTopK3I64Output1) {
f_ref = std::make_shared<ngraph::Function>(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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ std::pair<bool, std::string> compare_functions(
const std::shared_ptr<ngraph::Function>& 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
Expand Down Expand Up @@ -142,10 +143,12 @@ std::pair<bool, std::string> 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())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ std::pair<bool, std::string> compare_functions(
const std::shared_ptr<ngraph::Function>& 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<ngraph::Function> & f);

Expand Down

0 comments on commit 87ddcce

Please sign in to comment.