From b775841bfb7552c88b63a949dbb72f96c67e83c7 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Tue, 5 Nov 2024 17:10:02 +0200 Subject: [PATCH] Refactoring after code review --- src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp | 2 +- .../intel_npu/tools/protopipe/src/scenario/inference.hpp | 2 +- .../tools/protopipe/src/simulation/ov_layers_reader.cpp | 2 +- .../intel_npu/tools/protopipe/src/simulation/simulation.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp b/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp index b5337d127c442d..7417b3884dba58 100644 --- a/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp +++ b/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp @@ -346,7 +346,7 @@ struct convert { } if (node["reshape"]) { - params.reshape = node["reshape"].as>> (); + params.reshape = node["reshape"].as>> (); } if (node["config"]) { diff --git a/src/plugins/intel_npu/tools/protopipe/src/scenario/inference.hpp b/src/plugins/intel_npu/tools/protopipe/src/scenario/inference.hpp index c87e9d49459785..c10b9768252a40 100644 --- a/src/plugins/intel_npu/tools/protopipe/src/scenario/inference.hpp +++ b/src/plugins/intel_npu/tools/protopipe/src/scenario/inference.hpp @@ -91,7 +91,7 @@ struct OpenVINOParams { LayerVariantAttr output_layout; LayerVariantAttr input_model_layout; LayerVariantAttr output_model_layout; - LayerVariantAttr> reshape; + LayerVariantAttr> reshape; std::map config; size_t nireq = 1u; }; diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/ov_layers_reader.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/ov_layers_reader.cpp index 8bce04247595f6..f15bcba8b9ebc5 100644 --- a/src/plugins/intel_npu/tools/protopipe/src/simulation/ov_layers_reader.cpp +++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/ov_layers_reader.cpp @@ -129,7 +129,7 @@ static void cfgOutputPostproc(ov::preprocess::PrePostProcessor& ppp, const std:: } static void cfgReshape(const std::shared_ptr& model, - const AttrMap> shape_map) { + const AttrMap> shape_map) { std::map partial_shapes; for (const auto& [layer_name, shape] : shape_map) { partial_shapes.emplace(layer_name, shape); diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp index 76e5b6c2837e4c..b7ea9278f1f24b 100644 --- a/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp +++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp @@ -22,10 +22,10 @@ static cv::gapi::GNetPackage getNetPackage(const std::string& tag, const OpenVIN const auto& blob_path = std::get(params.path); network = std::make_unique

(tag, blob_path.blob, params.device); } - if (std::holds_alternative>>(params.reshape)) { - network->cfgReshape(std::get>>(params.reshape)); + if (std::holds_alternative>>(params.reshape)) { + network->cfgReshape(std::get>>(params.reshape)); } else { - network->cfgReshape(std::get>(params.reshape)); + network->cfgReshape(std::get>(params.reshape)); } network->cfgPluginConfig(params.config);