[CONFORMANCE] Revert Real Op versions to Opsets (#20714)

This commit is contained in:
Irina Efode authored and GitHub committed 2023-10-27 09:27:18 +02:00
1 parent fd88a6b455
commit 0139fffc18
5 files changed
+11 -94

No files matched your search

@@ -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 ";
@@ -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);
}
@@ -11,84 +11,6 @@ namespace ov {
namespace test {
namespace functional {
// {{ type_info, real_version }}
const std::map<ov::NodeTypeInfo, size_t> 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<ov::Node>& node, const std::string& postfix = "");
std::string get_node_version(const ov::NodeTypeInfo& node_type_info);
@@ -97,7 +97,7 @@
<table class="table table-hover" id="report">
<thead>
<tr>
<th class="table-dark" scope="col" style="position: sticky; top: 97px">Operation</th>
<th class="table-dark" scope="col" style="position: sticky; top: 97px">Operation ({OpName}-{FirstOpsetNumberContainsOp})</th>
{% for d in devices -%}
<th class="table-dark device {{ d }}" style="position: sticky; top: 97px">{{ d }}</th>
{% endfor %}
@@ -20,14 +20,10 @@ std::string get_node_version(const std::shared_ptr<ov::Node>& 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;
}