From 0139fffc1809a87723650ea84a4c7536a25b2b86 Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Fri, 27 Oct 2023 11:27:18 +0400 Subject: [PATCH] [CONFORMANCE] Revert Real Op versions to Opsets (#20714) --- .../src/matchers/subgraph/fused_names.cpp | 5 +- .../subgraphs_dumper/tests/cache/op_cache.cpp | 8 +- .../functional_test_utils/summary/op_info.hpp | 78 ------------------- .../template/report_template.html | 2 +- .../src/summary/op_info.cpp | 12 +-- 5 files changed, 11 insertions(+), 94 deletions(-) diff --git a/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/fused_names.cpp b/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/fused_names.cpp index 17c477d8a51..b8c6408329a 100644 --- a/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/fused_names.cpp +++ b/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/fused_names.cpp @@ -16,13 +16,12 @@ using namespace ov::tools::subgraph_dumper; void FusedNamesExtractor::set_target_device(const std::string& _device) { auto available_devices = core->get_available_devices(); - if (_device.empty()) { + if (_device.empty() && !available_devices.empty()) { device = available_devices.front(); std::cout << "[ WARNING ][ GRAPH CACHE ] " << device << " will be used for `fused_names` extractor" << std::endl; return; - } else if (_device != "TEMPLATE" && - std::find(available_devices.begin(), + } else if (std::find(available_devices.begin(), available_devices.end(), _device) == available_devices.end()) { std::string message = "Incorrect device "; diff --git a/src/tests/functional/plugin/conformance/subgraphs_dumper/tests/cache/op_cache.cpp b/src/tests/functional/plugin/conformance/subgraphs_dumper/tests/cache/op_cache.cpp index 6900efd658b..ad141077a8d 100644 --- a/src/tests/functional/plugin/conformance/subgraphs_dumper/tests/cache/op_cache.cpp +++ b/src/tests/functional/plugin/conformance/subgraphs_dumper/tests/cache/op_cache.cpp @@ -133,7 +133,7 @@ TEST_F(OpCacheUnitTest, update_cache_by_model) { ASSERT_EQ(meta.get_model_info().begin()->second.model_priority, 3); // check input_info ASSERT_EQ(meta.get_input_info().size(), 1); - ASSERT_EQ(meta.get_input_info().begin()->first, "Convert-0_0"); + ASSERT_EQ(meta.get_input_info().begin()->first, "Convert-1_0"); ASSERT_EQ(meta.get_input_info().begin()->second.ranges.max, DEFAULT_MAX_VALUE); ASSERT_EQ(meta.get_input_info().begin()->second.ranges.min, DEFAULT_MIN_VALUE); ASSERT_EQ(meta.get_input_info().begin()->second.is_const, false); @@ -150,7 +150,7 @@ TEST_F(OpCacheUnitTest, update_cache_by_model) { ASSERT_EQ(meta.get_model_info().begin()->second.model_priority, 1); // check input_info ASSERT_EQ(meta.get_input_info().size(), 1); - ASSERT_EQ(meta.get_input_info().begin()->first, "ShapeOf-0_0"); + ASSERT_EQ(meta.get_input_info().begin()->first, "ShapeOf-1_0"); ASSERT_EQ(meta.get_input_info().begin()->second.ranges.max, DEFAULT_MAX_VALUE); ASSERT_EQ(meta.get_input_info().begin()->second.ranges.min, DEFAULT_MIN_VALUE); ASSERT_EQ(meta.get_input_info().begin()->second.is_const, false); @@ -163,7 +163,7 @@ TEST_F(OpCacheUnitTest, serialize_op) { ASSERT_TRUE(this->serialize_op({convert_node, test_meta})); ASSERT_TRUE(ov::util::directory_exists(test_artifacts_dir)); auto serialized_model_path = ov::util::path_join({test_artifacts_dir, - "operation", "static", "Convert-0", "f16", "Convert-0_0.xml"}); + "operation", "static", "Convert-1", "f16", "Convert-1_0.xml"}); ASSERT_TRUE(ov::util::file_exists(serialized_model_path)); auto serialized_model = core->read_model(serialized_model_path); auto res = compare_functions(test_model, serialized_model, true, false, true, true, true, false); @@ -171,7 +171,7 @@ TEST_F(OpCacheUnitTest, serialize_op) { } TEST_F(OpCacheUnitTest, get_rel_serilization_dir) { - auto ref_path = ov::util::path_join({"operation", "static", "Convert-0", "f16"}); + auto ref_path = ov::util::path_join({"operation", "static", "Convert-1", "f16"}); auto original_path = this->get_rel_serilization_dir(convert_node); ASSERT_EQ(ref_path, original_path); } diff --git a/src/tests/test_utils/functional_test_utils/include/functional_test_utils/summary/op_info.hpp b/src/tests/test_utils/functional_test_utils/include/functional_test_utils/summary/op_info.hpp index ef76694caf9..3575f42ad34 100644 --- a/src/tests/test_utils/functional_test_utils/include/functional_test_utils/summary/op_info.hpp +++ b/src/tests/test_utils/functional_test_utils/include/functional_test_utils/summary/op_info.hpp @@ -11,84 +11,6 @@ namespace ov { namespace test { namespace functional { -// {{ type_info, real_version }} -const std::map not_aligned_op_version = { - // opset 1 - {ov::op::v0::Abs::get_type_info_static(), 0}, - {ov::op::v0::Acos::get_type_info_static(), 0}, - {ov::op::v0::Asin::get_type_info_static(), 0}, - {ov::op::v0::Atan::get_type_info_static(), 0}, - {ov::op::v0::BatchNormInference::get_type_info_static(), 0}, - {ov::op::v0::CTCGreedyDecoder::get_type_info_static(), 0}, - {ov::op::v0::Ceiling::get_type_info_static(), 0}, - {ov::op::v0::Clamp::get_type_info_static(), 0}, - {ov::op::v0::Concat::get_type_info_static(), 0}, - {ov::op::v0::Constant::get_type_info_static(), 0}, - {ov::op::v0::Convert::get_type_info_static(), 0}, - {ov::op::v0::Cos::get_type_info_static(), 0}, - {ov::op::v0::Cosh::get_type_info_static(), 0}, - {ov::op::v0::DepthToSpace::get_type_info_static(), 0}, - {ov::op::v0::DetectionOutput::get_type_info_static(), 0}, - {ov::op::v0::Elu::get_type_info_static(), 0}, - {ov::op::v0::Erf::get_type_info_static(), 0}, - {ov::op::v0::Exp::get_type_info_static(), 0}, - {ov::op::v0::FakeQuantize::get_type_info_static(), 0}, - {ov::op::v0::Floor::get_type_info_static(), 0}, - {ov::op::v0::GRN::get_type_info_static(), 0}, - {ov::op::v0::HardSigmoid::get_type_info_static(), 0}, - {ov::op::v0::Interpolate::get_type_info_static(), 0}, - {ov::op::v0::Log::get_type_info_static(), 0}, - {ov::op::v0::LRN::get_type_info_static(), 0}, - {ov::op::v0::LSTMCell::get_type_info_static(), 0}, - {ov::op::v0::LSTMSequence::get_type_info_static(), 0}, - {ov::op::v0::MatMul::get_type_info_static(), 0}, - {ov::op::v0::Negative::get_type_info_static(), 0}, - {ov::op::v0::NormalizeL2::get_type_info_static(), 0}, - {ov::op::v0::PRelu::get_type_info_static(), 0}, - {ov::op::v0::PSROIPooling::get_type_info_static(), 0}, - {ov::op::v0::Parameter::get_type_info_static(), 0}, - {ov::op::v0::PriorBox::get_type_info_static(), 0}, - {ov::op::v0::PriorBoxClustered::get_type_info_static(), 0}, - {ov::op::v0::Proposal::get_type_info_static(), 0}, - {ov::op::v0::Range::get_type_info_static(), 0}, - {ov::op::v0::Relu::get_type_info_static(), 0}, - {ov::op::v0::RegionYolo::get_type_info_static(), 0}, - {ov::op::v0::Result::get_type_info_static(), 0}, - {ov::op::v0::ReverseSequence::get_type_info_static(), 0}, - {ov::op::v0::RNNCell::get_type_info_static(), 0}, - {ov::op::v0::Selu::get_type_info_static(), 0}, - {ov::op::v0::ShapeOf::get_type_info_static(), 0}, - {ov::op::v0::ShuffleChannels::get_type_info_static(), 0}, - {ov::op::v0::Sign::get_type_info_static(), 0}, - {ov::op::v0::Sigmoid::get_type_info_static(), 0}, - {ov::op::v0::Sin::get_type_info_static(), 0}, - {ov::op::v0::Sinh::get_type_info_static(), 0}, - {ov::op::v0::Sqrt::get_type_info_static(), 0}, - {ov::op::v0::SpaceToDepth::get_type_info_static(), 0}, - {ov::op::v0::SquaredDifference::get_type_info_static(), 0}, - {ov::op::v0::Squeeze::get_type_info_static(), 0}, - {ov::op::v0::Tan::get_type_info_static(), 0}, - {ov::op::v0::Tanh::get_type_info_static(), 0}, - {ov::op::v0::TensorIterator::get_type_info_static(), 0}, - {ov::op::v0::Tile::get_type_info_static(), 0}, - {ov::op::v0::Unsqueeze::get_type_info_static(), 0}, - {ov::op::v0::Xor::get_type_info_static(), 0}, - // opset 2 - {ov::op::v0::MVN::get_type_info_static(), 0}, - {ov::op::v0::ReorgYolo::get_type_info_static(), 0}, - {ov::op::v0::ROIPooling::get_type_info_static(), 0}, - {ov::op::v0::Gelu::get_type_info_static(), 0}, - {ov::op::v1::BatchToSpace::get_type_info_static(), 1}, - {ov::op::v1::SpaceToBatch::get_type_info_static(), 1}, - // opset 3 - {ov::op::v0::RNNCell::get_type_info_static(), 0}, - {ov::op::v0::ShuffleChannels::get_type_info_static(), 0}, - // opset 4 - {ov::op::v3::Acosh::get_type_info_static(), 3}, - {ov::op::v3::Asinh::get_type_info_static(), 3}, - {ov::op::v3::Atanh::get_type_info_static(), 3}, -}; - // todo: reuse in summary std::string get_node_version(const std::shared_ptr& node, const std::string& postfix = ""); std::string get_node_version(const ov::NodeTypeInfo& node_type_info); diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html b/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html index e440458b270..2b7ea78cc1d 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html @@ -97,7 +97,7 @@ - + {% for d in devices -%} {% endfor %} diff --git a/src/tests/test_utils/functional_test_utils/src/summary/op_info.cpp b/src/tests/test_utils/functional_test_utils/src/summary/op_info.cpp index 358be2d424b..17dd6350245 100644 --- a/src/tests/test_utils/functional_test_utils/src/summary/op_info.cpp +++ b/src/tests/test_utils/functional_test_utils/src/summary/op_info.cpp @@ -20,14 +20,10 @@ std::string get_node_version(const std::shared_ptr& node, const std::s std::string get_node_version(const ov::NodeTypeInfo& node_type_info) { std::string op_name = node_type_info.name + std::string("-"); std::string opset_version = node_type_info.get_version(); - if (not_aligned_op_version.count(node_type_info)) { - op_name += std::to_string(not_aligned_op_version.at(node_type_info)); - } else { - std::string opset_name = "opset"; - auto pos = opset_version.find(opset_name); - if (pos != std::string::npos) { - op_name += opset_version.substr(pos + opset_name.size()); - } + std::string opset_name = "opset"; + auto pos = opset_version.find(opset_name); + if (pos != std::string::npos) { + op_name += opset_version.substr(pos + opset_name.size()); } return op_name; }
OperationOperation ({OpName}-{FirstOpsetNumberContainsOp}){{ d }}