From b39d82c0a9f445b994da65246881bb03dc0b8838 Mon Sep 17 00:00:00 2001 From: iefode Date: Tue, 26 Sep 2023 00:25:48 +0400 Subject: [PATCH] fix vuild --- .../src/matchers/subgraph/fused_names.cpp | 12 +++++++--- .../src/matchers/subgraph/manager.cpp | 23 ++++++++++--------- 2 files changed, 21 insertions(+), 14 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 ba5c53e203a90c..c50744140e5c2b 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,8 +16,14 @@ using namespace ov::tools::subgraph_dumper; void FusedNamesExtractor::set_target_device(const std::string& _device) { auto available_devices = core->get_available_devices(); - if (std::find(available_devices.begin(), available_devices.end(), _device) == - available_devices.end()) { + if (_device.empty()) { + device = available_devices.front(); + std::cout << "[ WARNING ][ GRAPH CACHE ] " << device << + " will be used for `fused_names` extractor" << std::endl; + return; + } else if (std::find(available_devices.begin(), + available_devices.end(), + _device) == available_devices.end()) { std::string message = "Incorrect device "; message += _device; message += " to enable `fused_names` extractor! Available devices: "; @@ -25,7 +31,7 @@ void FusedNamesExtractor::set_target_device(const std::string& _device) { throw std::runtime_error(message); } device = _device; - std::cout << "[ INFO ][ GRAPH CASE ] " << device << " is using for `fused_names` extractor" << std::endl; + std::cout << "[ INFO ][ GRAPH CACHE ] " << device << " is using for `fused_names` extractor" << std::endl; } std::unordered_set diff --git a/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/manager.cpp b/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/manager.cpp index ec8e2596451ee3..18575c7ec40f52 100644 --- a/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/manager.cpp +++ b/src/tests/functional/plugin/conformance/subgraphs_dumper/src/matchers/subgraph/manager.cpp @@ -127,18 +127,19 @@ ExtractorsManager::extract(const std::shared_ptr &model, auto delta = std::chrono::duration_cast(end - start).count(); std::cout << "[ INFO ][ EXTRACTOR DURATION ][ ORIGINAL MODEL ] " << it.first << " " << delta << "ms" << std::endl; - if (!is_dynamic_model(model)) { - // extract patterns from models after `constant_folding` pass - ov::pass::Manager manager; - manager.register_pass(); - manager.run_passes(model); - extracted_patterns = it.second->extract(model, is_extract_body, is_copy_constants); - result.insert(result.end(), extracted_patterns.begin(), extracted_patterns.end()); + // todo: enable it after validation + // if (!is_dynamic_model(model)) { + // // extract patterns from models after `constant_folding` pass + // ov::pass::Manager manager; + // manager.register_pass(); + // manager.run_passes(model); + // extracted_patterns = it.second->extract(model, is_extract_body, is_copy_constants); + // result.insert(result.end(), extracted_patterns.begin(), extracted_patterns.end()); - end = std::chrono::high_resolution_clock::now(); - delta = std::chrono::duration_cast(end - start).count(); - std::cout << "[ INFO ][ EXTRACTOR DURATION ][ CONSTANT FOLDING ] " << it.first << " " << delta << "ms" << std::endl; - } + // end = std::chrono::high_resolution_clock::now(); + // delta = std::chrono::duration_cast(end - start).count(); + // std::cout << "[ INFO ][ EXTRACTOR DURATION ][ CONSTANT FOLDING ] " << it.first << " " << delta << "ms" << std::endl; + // } } return result; }