diff --git a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/summary/op_summary.hpp b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/summary/op_summary.hpp index 62700ea41f9..ed9557e5474 100644 --- a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/summary/op_summary.hpp +++ b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/summary/op_summary.hpp @@ -31,7 +31,7 @@ private: static bool extractBody; std::map opsStats = {}; - std::string getOpVersion(const ov::NodeTypeInfo &type_info); + std::string getOpVersion(const std::string& version); protected: OpSummary(); diff --git a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py index 3e5fbab1a9a..3b71556b493 100644 --- a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py +++ b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py @@ -142,7 +142,9 @@ def merge_xml(input_folder_paths: list, output_folder_paths: str, output_filenam logger.error(f'{folder_path} does not contain the correct xml files') for entity in xml_root.find(entity_name): if entity_list.find(entity.tag) is None: - SubElement(entity_list, entity.tag) + entity_node = SubElement(entity_list, entity.tag) + for op_attrib in entity.attrib: + entity_node.set(op_attrib, entity.get(op_attrib)) timestamp = aggregate_test_results(results, xml_reports, report_type, merge_device_suffix) if report_type == "OP": stat_update_utils.update_passrates(results) diff --git a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/summarize.py b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/summarize.py index a36523e9690..713c90bac2e 100644 --- a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/summarize.py +++ b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/summarize.py @@ -96,7 +96,9 @@ def merge_xmls(xml_paths: list): for op in xml_root.find("ops_list"): if ops_list.find(op.tag) is None: - SubElement(ops_list, op.tag) + op_node = SubElement(ops_list, op.tag) + for op_attrib in op.attrib: + op_node.set(op_attrib, op.get(op_attrib)) for device in xml_root.find("results"): device_results = summary_results.find(device.tag) @@ -278,10 +280,14 @@ def create_summary(summary_root: Element, output_folder: os.path, expected_devic device_list, results, general_pass_rate, general_pass_rate_rel, pass_rate_avg, pass_rate_avg_rel, general_test_count, trusted_ops, covered_ops = \ collect_statistic(summary_root, is_conformance_mode) - op_list = list() + op_list = dict() for op in summary_root.find("ops_list"): - op_list.append(op.tag) - op_list = sorted(op_list) + try: + opsets = op.attrib.get("opsets").split() + opsets = [int(opset) for opset in opsets] + except: + opsets = [] + op_list.update({op.tag: opsets}) if len(expected_devices) > 0 and sorted(expected_devices) != device_list: for expected_device in expected_devices: diff --git a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/filters.js b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/filters.js index e851a1c3224..998fc426f57 100644 --- a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/filters.js +++ b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/filters.js @@ -161,20 +161,10 @@ function filterTable() { } function checkVersion(element, opsetNumber) { - var name = element.find('th').text().split("-")[0]; - var version = Number(element.find('th').text().split("-")[1]); + var name = element.find('th')[0].getAttribute('name'); + var opsets = JSON.parse(name)[element.find('th').text()]; var realOpsetNumber = Number(opsetNumber); - if (version > realOpsetNumber) { - return false; - } else { - var versions = []; - $('#report #data tr th[name^="' + name + '-"]').each(function () { - if (Number($(this).text().split('-')[1]) <= realOpsetNumber) { - versions.push(Number(+$(this).text().split('-')[1])); - } - }); - return version == Math.max.apply(null, versions); - } + return opsets.indexOf(realOpsetNumber) != -1; } function calculateStatistics() { diff --git a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/report_template.html b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/report_template.html index bbaccbe0afd..5d7a0da7c7d 100644 --- a/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/report_template.html +++ b/src/tests/ie_test_utils/functional_test_utils/layer_tests_summary/template/report_template.html @@ -124,9 +124,10 @@ - {% for op in ordered_ops -%} + {% for op, opsets in ordered_ops.items() -%} - {{ op }} + {{ op }} + {% for d in devices -%} {% if op in results[d] -%} diff --git a/src/tests/ie_test_utils/functional_test_utils/src/summary/op_summary.cpp b/src/tests/ie_test_utils/functional_test_utils/src/summary/op_summary.cpp index 3ea86bdff94..0a189f78f3d 100644 --- a/src/tests/ie_test_utils/functional_test_utils/src/summary/op_summary.cpp +++ b/src/tests/ie_test_utils/functional_test_utils/src/summary/op_summary.cpp @@ -96,8 +96,8 @@ void OpSummary::updateOPsImplStatus(const ov::NodeTypeInfo &op, const bool implS } } -std::string OpSummary::getOpVersion(const ov::NodeTypeInfo &type_info) { - std::string opset_name = "opset", version = type_info.get_version(); +std::string OpSummary::getOpVersion(const std::string& version) { + std::string opset_name = "opset"; auto pos = version.find(opset_name); if (pos == std::string::npos) { return "undefined"; @@ -256,12 +256,21 @@ void OpSummary::saveReport() { std::string outputFilePath = outputFolder + std::string(CommonTestUtils::FileSeparator) + filename; - std::set opsInfo; + std::map opsInfo; for (const auto &opset_pair : get_available_opsets()) { std::string opset_version = opset_pair.first; const ov::OpSet& opset = opset_pair.second(); const auto &type_info_set = opset.get_type_info_set(); - opsInfo.insert(type_info_set.begin(), type_info_set.end()); + for (const auto& type_info : type_info_set) { + auto it = opsInfo.find(type_info); + std::string op_version = getOpVersion(opset_version); + if (it == opsInfo.end()) { + opsInfo.insert({type_info, op_version}); + } else { + opsInfo[type_info] += " "; + opsInfo[type_info] += op_version; + } + } } auto &summary = OpSummary::getInstance(); @@ -299,16 +308,16 @@ void OpSummary::saveReport() { pugi::xml_node opsNode = root.append_child("ops_list"); for (const auto &op : opsInfo) { - std::string name = std::string(op.name) + "-" + getOpVersion(op); - pugi::xml_node entry = opsNode.append_child(name.c_str()); - (void) entry; + std::string name = std::string(op.first.name) + "-" + getOpVersion(op.first.version_id); + std::cout << name << " " << op.second << std::endl; + opsNode.append_child(name.c_str()).append_attribute("opsets").set_value(op.second.c_str()); } pugi::xml_node resultsNode = root.child("results"); pugi::xml_node currentDeviceNode = resultsNode.append_child(summary.deviceName.c_str()); std::unordered_set opList; for (const auto &it : stats) { - std::string name = std::string(it.first.name) + "-" + getOpVersion(it.first); + std::string name = std::string(it.first.name) + "-" + getOpVersion(it.first.version_id); opList.insert(name); pugi::xml_node entry = currentDeviceNode.append_child(name.c_str()); entry.append_attribute("implemented").set_value(it.second.isImplemented);