From de980b8089f4450de8513c6a0e380b2cb20b6d16 Mon Sep 17 00:00:00 2001 From: Vitaliy Urusovskij Date: Tue, 21 Dec 2021 15:31:43 +0300 Subject: [PATCH] Actualize DeterministicityTest: update headers and used opset (#9335) --- .../ir_serialization/deterministicity.cpp | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp b/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp index d97ef097677..d7e98027610 100644 --- a/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp +++ b/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp @@ -10,10 +10,9 @@ #include "ie_core.hpp" #include -#include -#include +#include -using namespace ngraph; +using namespace ov; #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake # error "IR_SERIALIZATION_MODELS_PATH is not defined" @@ -114,22 +113,22 @@ protected: TEST_F(DeterministicityTest, IRInputsOrder) { const std::vector friend_names = {"A", "B", "C"}; - auto a = std::make_shared(element::f32, Shape{2, 2}); - auto b = std::make_shared(element::f32, Shape{2, 2}); - auto add = std::make_shared(a, b); - auto c = std::make_shared(element::f32, Shape{2, 2}); - auto relu = std::make_shared(c); - auto add2 = std::make_shared(add, relu); - auto res = std::make_shared(add2); + auto a = std::make_shared(element::f32, Shape{2, 2}); + auto b = std::make_shared(element::f32, Shape{2, 2}); + auto add = std::make_shared(a, b); + auto c = std::make_shared(element::f32, Shape{2, 2}); + auto relu = std::make_shared(c); + auto add2 = std::make_shared(add, relu); + auto res = std::make_shared(add2); a->set_friendly_name(friend_names[0]); b->set_friendly_name(friend_names[1]); c->set_friendly_name(friend_names[2]); - auto model = std::make_shared(NodeVector{res}, ParameterVector{a, b, c}); + auto model = std::make_shared(NodeVector{res}, ParameterVector{a, b, c}); - ov::runtime::Core core; - auto serialize = ov::pass::Serialize(m_out_xml_path, m_out_bin_path); + runtime::Core core; + auto serialize = pass::Serialize(m_out_xml_path, m_out_bin_path); serialize.run_on_function(model); auto serialized_func = core.read_model(m_out_xml_path); @@ -143,23 +142,23 @@ TEST_F(DeterministicityTest, IRInputsOrder) { TEST_F(DeterministicityTest, IROutputsOrder) { const std::vector friend_names = {"D", "E", "F"}; - auto a = std::make_shared(element::f32, Shape{4, 4}); - auto axis_1 = ngraph::opset5::Constant::create(element::i64, Shape{}, {1}); - auto split1 = std::make_shared(a, axis_1, 2); - auto res1 = std::make_shared(split1->output(0)); - auto relu = std::make_shared(split1->output(1)); - auto split2 = std::make_shared(relu, axis_1, 2); - auto res2 = std::make_shared(split2->output(0)); - auto res3 = std::make_shared(split2->output(1)); + auto a = std::make_shared(element::f32, Shape{4, 4}); + auto axis_1 = opset8::Constant::create(element::i64, Shape{}, {1}); + auto split1 = std::make_shared(a, axis_1, 2); + auto res1 = std::make_shared(split1->output(0)); + auto relu = std::make_shared(split1->output(1)); + auto split2 = std::make_shared(relu, axis_1, 2); + auto res2 = std::make_shared(split2->output(0)); + auto res3 = std::make_shared(split2->output(1)); res1->set_friendly_name(friend_names[0]); res2->set_friendly_name(friend_names[1]); res3->set_friendly_name(friend_names[2]); - auto model = std::make_shared(NodeVector{res1, res2, res3}, ParameterVector{a}); + auto model = std::make_shared(NodeVector{res1, res2, res3}, ParameterVector{a}); - ov::runtime::Core core; - auto serialize = ov::pass::Serialize(m_out_xml_path, m_out_bin_path); + runtime::Core core; + auto serialize = pass::Serialize(m_out_xml_path, m_out_bin_path); serialize.run_on_function(model); auto serialized_func = core.read_model(m_out_xml_path);