OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[Protopipe] EISW-225277 Add boolean type (#37422)
Vigh Sebastian8e1f4ac67df6
diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.mdindex 8ccceec2578..f1a1a4b9583 100644--- a/src/plugins/intel_npu/tools/protopipe/README.md+++ b/src/plugins/intel_npu/tools/protopipe/README.md@@ -54,9 +54,9 @@ log_level: INFO#### OpenVINO parameters- `priority` - **Optional**. Model priority: _HIGH_, _MEDIUM_, _LOW_. (Default: _MEDIUM_)- `config` - **Optional**. OpenVINO Plugin specific parameters.-- `device` - **Optional**. OpenVINO device name.-- `ip` - **Optional**. Input layer precision: _FP16_, _FP32_, _U8_, _I32_.-- `op` - **Optional**. Output layer precision: _FP16_, _FP32_, _U8_, _I32_.+- `device` - **Optional**. OpenVINO device name.+- `ip` - **Optional**. Input layer precision: _FP16_, _FP32_, _U8_, _I32_, _BOOL_.+- `op` - **Optional**. Output layer precision: _FP16_, _FP32_, _U8_, _I32_, _BOOL_.- `il` - **Optional**. Input layer layout.- `ol` - **Optional**. Output layer layout.- `iml` - **Optional**. Input model layout.@@ -90,7 +90,7 @@ Examples:```### Graph structure-There are two ways to describe the execution graph structure in Protopipe:+There are two ways to describe the execution graph structure in Protopipe:1. Using [Dependency Graph](#dependency-graph) (preferable)2. Using [Network Sequence](#network-sequence) (old)@@ -164,7 +164,7 @@ In this case the section `connections` **can be omitted**.```#1: Invalid - The list must contain at least two operations to connect- [A]-#2: Invalid - Self-loop is prohibited+#2: Invalid - Self-loop is prohibited- [A, A]#3: Invalid - Loop is prohibited- [A, B, C, A]@@ -218,20 +218,20 @@ graph LR;D[Model-D.xml]E[Model-E.xml]F[Model-F.xml]-+D --> ED --> Fend-+A --> BB --> C```#### Network Sequence-There is also a way to describe the graph by using chain-like structure:-`network` - **Required**. List or list of lists of model parameters. Follow [Model Parameters](#model-parameters) for the details.-`delay_in_us` - **Optional**. Delay between models in microseconds.+There is also a way to describe the graph by using chain-like structure:+`network` - **Required**. List or list of lists of model parameters. Follow [Model Parameters](#model-parameters) for the details.+`delay_in_us` - **Optional**. Delay between models in microseconds.```input_stream_list:@@ -239,7 +239,7 @@ input_stream_list:- { name: A.xml, ip: FP16, il: NCHW, device: CPU }- [{ name: B.xml, ip: FP16, op: FP16 }, { name: C.xml, ip: FP16, op: FP16 }]- { name: D.xml, ip: FP16, op: FP16, config: { PEROFMRANCE_HINT: LATENCY } }- delay_in_us: 5000+ delay_in_us: 5000``````mermaid@@ -255,13 +255,13 @@ input_stream_list:### Scenario parametersThe list of scenarios are specified by using `multi_inference` parameter, every scenario has the following parameters:- `name` - **Optional**. The name of execution scenario.-- `input_stream_list` - **Required**. The list of the streams that will be run in parallel.+- `input_stream_list` - **Required**. The list of the streams that will be run in parallel.Every stream has the following execution parameters:-- `name` - **Optional**. The name of the stream.-- `iteration_count` - **Optional**. Number of iterations to execute.-- `exec_time_in_secs` - **Optional**. Execute until timeout specified.-- `frames_interval_in_ms` - **Optional**. Execution frequency of the stream (**Default**: 0 - Unbounded)+- `name` - **Optional**. The name of the stream.+- `iteration_count` - **Optional**. Number of iterations to execute.+- `exec_time_in_secs` - **Optional**. Execute until timeout specified.+- `frames_interval_in_ms` - **Optional**. Execution frequency of the stream (**Default**: 0 - Unbounded)- `target_fps` - **Optional**. Execution frequency of the stream. `target_fps = 1000 / frames_interval_in_ms`. `target_fps` and `frames_interval_in_ms` are mutually exclusive and cannot be provided together.- `target_latency_in_ms` - **Optional**. When iteration isn't finished within specified interval, the next frame will be dropped from execution. (**Default**: Disabled)- `op_desc`/`conections` or `network` - **Required**. Execution graph structure. Follow [Graph structure](#graph-structure) for the details.@@ -276,7 +276,7 @@ Every stream has the following execution parameters:workload_type : {initial_value: Default, change_to: [Efficient, Default], change_interval: 5, repeat: true}```### Config example-Consider the following scenario that consists of two parallel streams specified on `config.yaml`:+Consider the following scenario that consists of two parallel streams specified on `config.yaml`:```model_dir:local: C:\workspace\models@@ -315,7 +315,7 @@ multi_inference:E-->F;F-->G;```-+Run:```./protopipe -cfg config.yaml --drop_frames@@ -329,21 +329,21 @@ stream 1: throughput: <number> FPS, latency: min: <number> ms, avg: <number> ms,```## How to run-Protopipe has the following `CLI` options to configure the execution behaviour:+Protopipe has the following `CLI` options to configure the execution behaviour:-`--cfg <path>` - Path to configuration file.-`--drop_frames`- **Optional**. Drop frames if they come earlier than stream is completed. E.g if `stream` works with `target_fps: 10` (~`100ms` latency) but stream iteration takes `150ms` - the next iteration will be triggered only in `50ms` if option is enabled.-`--pipeline` - **Optional**. Enables pipelined execution for all scenarios/streams.-`--niter <value>` - **Optional**. Number of iterations. If specified overwrites termination criterion specified in configuration file for all scenarios/streams.-`-t <value>` - **Optional**. Time in seconds. If specified overwrites termination criterion specified in configuration file for all scenarios/streams.+`--cfg <path>` - Path to configuration file.+`--drop_frames`- **Optional**. Drop frames if they come earlier than stream is completed. E.g if `stream` works with `target_fps: 10` (~`100ms` latency) but stream iteration takes `150ms` - the next iteration will be triggered only in `50ms` if option is enabled.+`--pipeline` - **Optional**. Enables pipelined execution for all scenarios/streams.+`--niter <value>` - **Optional**. Number of iterations. If specified overwrites termination criterion specified in configuration file for all scenarios/streams.+`-t <value>` - **Optional**. Time in seconds. If specified overwrites termination criterion specified in configuration file for all scenarios/streams.`--mode <value>` - **Optional**. Execution mode: *performance*, *reference*, *validation*, *accuracy* (**Default**: *performance*)`--reference_device <value>` - **Optional**. Reference device for accuracy mode comparison. (**Default**: *CPU*)`--target_device <value>` - **Optional**. Target device for accuracy mode comparison. (**Default**: *NPU*)-`--exec_filter <value>` - **Optional**. Run only the scenarios that match provided string pattern.-`--inference_only` - **Optional**. Run only inference execution for every model excluding i/o data transfer (**Default**: true)+`--exec_filter <value>` - **Optional**. Run only the scenarios that match provided string pattern.+`--inference_only` - **Optional**. Run only inference execution for every model excluding i/o data transfer (**Default**: true)### Filtering-Sometime it's needed to run particular set of scenarios specified in config file rather than all of them.+Sometime it's needed to run particular set of scenarios specified in config file rather than all of them.For example consider the following config file with three scenarios specified in `scenarios.yaml`:```model_dir:@@ -360,13 +360,13 @@ multi_inference:- network:- { name: C.xml }```-By default all scenarios are assigned unique names according to the following `multi_inference_<number>` pattern.-E.g scenario with model `A.xml` has default name `multi_inference_0`.-Use `-exec_filter <value>` CLI option to control what scenarios from config should be executed:+By default all scenarios are assigned unique names according to the following `multi_inference_<number>` pattern.+E.g scenario with model `A.xml` has default name `multi_inference_0`.+Use `-exec_filter <value>` CLI option to control what scenarios from config should be executed:```./protopipe -cfg scenarios.yaml -niter 100 -exec_filter=".*[0-1]"```-Only `multi_inference_0` and `multi_inference_1` scenarios will be executed.+Only `multi_inference_0` and `multi_inference_1` scenarios will be executed.It's also possible to overwrite the default names in config file:```@@ -416,7 +416,7 @@ As the prerequisite for accuracy validation it's useful to have a mechanism thatUse additional parameters to configure `reference` mode:- `input_data` - **Required**. Path that contain input data for the model, if entity under the path is empty, input data will be generated randomly and dumped into the path specified.- `output_data` - **Required**. Path where to dump reference output data.-- `random` - **Optional**. Initializer to generate input data randomly. (Default: ` { dist: uniform, low: 0.0, high: 255, seed: -1 }`)+- `random` - **Optional**. Initializer to generate input data randomly. (Default: ` { dist: uniform, low: 0.0, high: 255, seed: -1 }`, or `{ dist: uniform, low: 0.0, high: 2.0 }` for layers with `ip: BOOL`, so only valid `0`/`1` values are generated)Examples:```@@ -444,7 +444,7 @@ Protopipe has the dedicated `validation` mode to perform accuracy validation. Ex- `save_validation_outputs` - **Optional**. Accepts the path where to dump actual execution outputs. (Default: disabled)- `metric` - **Optional**. Accuracy metric to compare actual vs reference outputs. (Default: `{ name: norm, tolerance: 0.0 }`)- `input_data` - **Required**. Path that contain input data for the model.-- `output_data` - **Required**. Path that contain **reference** data to compare with.+- `output_data` - **Required**. Path that contain **reference** data to compare with.**Note**: If folder is provided either for **input_data** or **output_data**, it must be in the following format:```@@ -472,11 +472,11 @@ Examples:```### Supported metrics-1. L2 Norm: $$\text{Norm}(\mathbf{A}, \mathbf{B}) = \sqrt{\sum_{i,j} (A_{i,j} - B_{i,j})^2}$$+1. L2 Norm: $$\text{Norm}(\mathbf{A}, \mathbf{B}) = \sqrt{\sum_{i,j} (A_{i,j} - B_{i,j})^2}$$Parameters:- `name: norm` - **Required**. Enables L2 Norm metric.- `tolerance` - **Required**. If value of metric is greater than **tolerance** it will be treated as **FAIL**.-3. Cosine similarity: $$\text{Cosine}(\mathbf{A}, \mathbf{B}) = \frac{\mathbf{A} \cdot \mathbf{B}}{\| \mathbf{A} \|_2 \| \mathbf{B} \|_2}$$+3. Cosine similarity: $$\text{Cosine}(\mathbf{A}, \mathbf{B}) = \frac{\mathbf{A} \cdot \mathbf{B}}{\| \mathbf{A} \|_2 \| \mathbf{B} \|_2}$$Parameters:- `name: cosine` - **Required**. Enables cosine similarity metric.- `threshold` - **Required**. If value of metric is lower than **threshold** it will be treated as **FAIL**.@@ -616,7 +616,7 @@ Iteration <number>:```### Verify the installation**Note**: Make sure `opencv_*` libraries are visible in the environment:-- Windows:+- Windows:```set PATH=<path-to-opencv>\build\bin\Release\;%PATH%```diff --git a/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp b/src/plugins/intel_npu/tools/protopipe/src/parser/config.cppindex f8c9236e882..c343d4c7be6 100644--- a/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/parser/config.cpp@@ -7,6 +7,7 @@#include "utils/error.hpp"#include "utils/logger.hpp"+#include "utils/utils.hpp"#include <cstdint>#include <filesystem>@@ -99,6 +100,8 @@ static int toDepth(const std::string& prec) {return CV_8U;if (prec == "I32" || prec == "I64")return CV_32S;+ if (prec == "BOOL")+ return utils::kBooleanDepth;throw std::logic_error("Unsupported precision type: " + prec);}diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/accuracy_mode.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/accuracy_mode.cppindex 5190fb3b3ea..f156a946933 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/accuracy_mode.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/accuracy_mode.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -93,12 +92,8 @@ struct InputDataVisitor {void InputDataVisitor::operator()(std::monostate) {// NB: No path provided - generate input random data using initializers.- const auto input_names = extractLayerNames(infer.input_layers);const auto& initializers = opts.initializers_map.at(infer.tag);-- auto default_initialzer =- opts.global_initializer ? opts.global_initializer : std::make_shared<UniformGenerator>(0.0, 255.0);- auto layer_initializers = unpackWithDefault(initializers, input_names, default_initialzer);+ auto layer_initializers = resolveInitializers(infer.input_layers, initializers, opts.global_initializer);providers = createRandomProviders(infer.input_layers, std::move(layer_initializers));};@@ -125,9 +120,7 @@ void InputDataVisitor::operator()(const std::string& path_str) {// NB: Provided path doesn't exist - fall back to random data generation.LOG_INFO() << "Input data path: " << path << " for model: " << infer.tag<< " doesn't exist - using random data" << std::endl;- auto default_initialzer =- opts.global_initializer ? opts.global_initializer : std::make_shared<UniformGenerator>(0.0, 255.0);- auto layer_initializers = unpackWithDefault(initializers, input_names, default_initialzer);+ auto layer_initializers = resolveInitializers(infer.input_layers, initializers, opts.global_initializer);providers = createRandomProviders(infer.input_layers, std::move(layer_initializers));}}diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.cppindex 7657f96fc10..a3a4bc9cb96 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -134,6 +133,27 @@ std::vector<IDataProvider::Ptr> createRandomProviders(const LayersInfo& layers,return providers;}+static IRandomGenerator::Ptr defaultInitializer(int prec) {+ // NB: Booleans are physically stored as U8, but only 0/1 are valid values.+ if (prec == utils::kBooleanDepth) {+ return std::make_shared<UniformGenerator>(0.0, 2.0);+ }+ return std::make_shared<UniformGenerator>(0.0, 255.0);+}++std::map<std::string, IRandomGenerator::Ptr> resolveInitializers(+ const LayersInfo& layers, const LayerVariantAttr<IRandomGenerator::Ptr>& initializers,+ const IRandomGenerator::Ptr& global_initializer) {+ auto per_layer = unpackWithDefault(initializers, extractLayerNames(layers), IRandomGenerator::Ptr{});+ for (const auto& layer : layers) {+ auto& generator = per_layer.at(layer.name);+ if (!generator) {+ generator = global_initializer ? global_initializer : defaultInitializer(layer.prec);+ }+ }+ return per_layer;+}+std::vector<std::filesystem::path> createDirectoryLayout(const std::filesystem::path& path,const std::vector<std::string>& layer_names) {std::vector<std::filesystem::path> dirs_path;diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.hpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.hppindex 121a79a1851..b799c584610 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.hpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/layers_data.hpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -28,6 +27,13 @@ std::vector<IDataProvider::Ptr> createConstantProviders(LayersDataMap&& layers_dstd::vector<IDataProvider::Ptr> createRandomProviders(const LayersInfo& layers,const std::map<std::string, IRandomGenerator::Ptr>& generators);+// NB: Resolves a random generator per input layer: explicit per-layer/global initializers+// take precedence, otherwise falls back to a precision-aware default (e.g. boolean layers+// default to {0, 1} instead of the generic U8 {0, 255} range).+std::map<std::string, IRandomGenerator::Ptr> resolveInitializers(+ const LayersInfo& layers, const LayerVariantAttr<IRandomGenerator::Ptr>& initializers,+ const IRandomGenerator::Ptr& global_initializer);+std::vector<std::filesystem::path> createDirectoryLayout(const std::filesystem::path& path,const std::vector<std::string>& layer_names);template <typename T>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.cppindex ad8db2b935a..d40df2d9385 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@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -9,6 +8,7 @@#include <openvino/openvino.hpp>#include "utils/error.hpp"+#include "utils/utils.hpp"#include <fstream>@@ -40,6 +40,8 @@ static ov::element::Type toElementType(int cvdepth) {return ov::element::f32;case CV_16F:return ov::element::f16;+ case utils::kBooleanDepth:+ return ov::element::boolean;}throw std::logic_error("Failed to convert opencv depth to ov::element::Type");}@@ -66,6 +68,8 @@ static int toPrecision(ov::element::Type prec) {return CV_16F;case ov::element::i64:return CV_32S;+ case ov::element::boolean:+ return utils::kBooleanDepth;}throw std::logic_error("Unsupported OV precision");}@@ -128,7 +132,7 @@ static void cfgOutputPostproc(ov::preprocess::PrePostProcessor& ppp, const std::}}-static void cfgReshape(const std::shared_ptr<ov::Model>& model,+static void cfgReshape(const std::shared_ptr<ov::Model>& model,const AttrMap<std::vector<size_t>> reshape_map) {std::map<std::string, ov::PartialShape> partial_shapes;for (const auto& [layer_name, shape] : reshape_map) {diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/performance_mode.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/performance_mode.cppindex e7630cc88a0..1c790c0c975 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/performance_mode.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/performance_mode.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -74,11 +73,8 @@ struct InputDataVisitor {void InputDataVisitor::operator()(std::monostate) {LOG_INFO() << "Input data path for model: " << infer.tag << " hasn't been provided. Will be generated randomly"<< std::endl;- auto initializers = opts.initializers_map.at(infer.tag);- auto default_initialzer =- opts.global_initializer ? opts.global_initializer : std::make_shared<UniformGenerator>(0.0, 255.0);- auto per_layer_initializers =- unpackWithDefault(initializers, extractLayerNames(infer.input_layers), default_initialzer);+ const auto& initializers = opts.initializers_map.at(infer.tag);+ auto per_layer_initializers = resolveInitializers(infer.input_layers, initializers, opts.global_initializer);providers = createRandomProviders(infer.input_layers, per_layer_initializers);};@@ -90,11 +86,8 @@ void InputDataVisitor::operator()(const std::string& path_str) {auto layers_data = uploadData(path, infer.tag, infer.input_layers, LayersType::INPUT);providers = createConstantProviders(std::move(layers_data), extractLayerNames(infer.input_layers));} else {- auto initializers = opts.initializers_map.at(infer.tag);- auto default_initialzer =- opts.global_initializer ? opts.global_initializer : std::make_shared<UniformGenerator>(0.0, 255.0);- auto per_layer_initializers =- unpackWithDefault(initializers, extractLayerNames(infer.input_layers), default_initialzer);+ const auto& initializers = opts.initializers_map.at(infer.tag);+ auto per_layer_initializers = resolveInitializers(infer.input_layers, initializers, opts.global_initializer);LOG_INFO() << "Input data path: " << path << " for model: " << infer.tag<< " provided but doesn't exist - will be generated randomly" << std::endl;providers = createRandomProviders(infer.input_layers, per_layer_initializers);diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/reference_mode.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/reference_mode.cppindex ac296c908bf..7471c800d31 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/reference_mode.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/reference_mode.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -81,9 +80,7 @@ void InputDataVisitor::operator()(const std::string& path_str) {std::filesystem::create_directories(path.parent_path());dump_path_vec = {path};}- auto default_initialzer =- opts.global_initializer ? opts.global_initializer : std::make_shared<UniformGenerator>(0.0, 255.0);- auto layer_initializers = unpackWithDefault(initializers, input_names, default_initialzer);+ auto layer_initializers = resolveInitializers(infer.input_layers, initializers, opts.global_initializer);providers = createRandomProviders(infer.input_layers, std::move(layer_initializers));for (uint32_t i = 0; i < infer.input_layers.size(); ++i) {metas[i].set(Dump{dump_path_vec[i]});diff --git a/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp b/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cppindex f8075d01756..f00ad79bbcd 100644--- a/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/simulation/simulation.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -7,6 +6,7 @@#include "scenario/inference.hpp"#include "utils/error.hpp"+#include "utils/utils.hpp"#include <opencv2/gapi/infer/onnx.hpp> // onnx::Params#include <opencv2/gapi/infer/ov.hpp> // ov::Params@@ -31,9 +31,13 @@ static cv::gapi::GNetPackage getNetPackage(const std::string& tag, const OpenVINnetwork->cfgEnsureNamedTensors();if (std::holds_alternative<int>(params.output_precision)) {- network->cfgOutputTensorPrecision(std::get<int>(params.output_precision));+ network->cfgOutputTensorPrecision(utils::toPhysicalDepth(std::get<int>(params.output_precision)));} else if (std::holds_alternative<AttrMap<int>>(params.output_precision)) {- network->cfgOutputTensorPrecision(std::get<AttrMap<int>>(params.output_precision));+ auto precision_map = std::get<AttrMap<int>>(params.output_precision);+ for (auto& [name, prec] : precision_map) {+ prec = utils::toPhysicalDepth(prec);+ }+ network->cfgOutputTensorPrecision(std::move(precision_map));}if (params.clamp_outputs) {diff --git a/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.cpp b/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.cppindex 2ad9f4131af..0d68c888fb8 100644--- a/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -36,10 +35,11 @@ void RandomProvider::pull(cv::Mat& mat) {}cv::GMatDesc RandomProvider::desc() {+ const int depth = utils::toPhysicalDepth(m_depth);if (m_dims.size() == 2u) {- return cv::GMatDesc{m_depth, 1, cv::Size(m_dims[1], m_dims[0])};+ return cv::GMatDesc{depth, 1, cv::Size(m_dims[1], m_dims[0])};}- return cv::GMatDesc{m_depth, m_dims};+ return cv::GMatDesc{depth, m_dims};}CircleBuffer::CircleBuffer(const std::vector<cv::Mat>& buffer): m_buffer(buffer), m_pos(0u) {diff --git a/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.hpp b/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.hppindex c39e9c83b07..20ee09d15ee 100644--- a/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.hpp+++ b/src/plugins/intel_npu/tools/protopipe/src/utils/data_providers.hpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -6,6 +5,7 @@#pragma once#include <memory>+#include <string>#include <vector>#include <opencv2/gapi/gmat.hpp>diff --git a/src/plugins/intel_npu/tools/protopipe/src/utils/utils.cpp b/src/plugins/intel_npu/tools/protopipe/src/utils/utils.cppindex ece1b4d5dde..ffa40a34d5c 100644--- a/src/plugins/intel_npu/tools/protopipe/src/utils/utils.cpp+++ b/src/plugins/intel_npu/tools/protopipe/src/utils/utils.cpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -12,9 +11,13 @@namespace utils {+int toPhysicalDepth(int depth) {+ return depth == kBooleanDepth ? CV_8U : depth;+}+void createNDMat(cv::Mat& mat, const std::vector<int>& dims, int depth) {GAPI_Assert(!dims.empty());- mat.create(dims, depth);+ mat.create(dims, toPhysicalDepth(depth));if (dims.size() == 1) {// FIXME: Well-known 1D mat WAmat.dims = 1;diff --git a/src/plugins/intel_npu/tools/protopipe/src/utils/utils.hpp b/src/plugins/intel_npu/tools/protopipe/src/utils/utils.hppindex 71468e24990..9031057e931 100644--- a/src/plugins/intel_npu/tools/protopipe/src/utils/utils.hpp+++ b/src/plugins/intel_npu/tools/protopipe/src/utils/utils.hpp@@ -1,4 +1,3 @@-//// Copyright (C) 2018-2026 Intel Corporation// SPDX-License-Identifier: Apache-2.0//@@ -15,6 +14,15 @@namespace utils {+// NB: protopipe-specific precision marker (not a real cv::Mat depth) used to distinguish+// boolean layers from generic U8 ones. Booleans are physically stored as a single byte,+// like U8, but only 0/1 are valid values, which matters for random test data generation.+constexpr int kBooleanDepth = CV_16F + 1;++// NB: Maps kBooleanDepth to its actual physical cv::Mat storage depth (CV_8U), leaving+// any real cv::Mat depth unchanged.+int toPhysicalDepth(int depth);+void createNDMat(cv::Mat& mat, const std::vector<int>& dims, int depth);void generateRandom(cv::Mat& out);cv::Mat createRandom(const std::vector<int>& dims, int depth);diff --git a/src/plugins/intel_npu/tools/protopipe/version.hpp.in b/src/plugins/intel_npu/tools/protopipe/version.hpp.inindex 576ca850965..4b245be4b20 100644--- a/src/plugins/intel_npu/tools/protopipe/version.hpp.in+++ b/src/plugins/intel_npu/tools/protopipe/version.hpp.in@@ -1,3 +1,3 @@#pragma once-#define APP_VERSION "v1.2.4-@GIT_SHA@"+#define APP_VERSION "v1.2.5-@GIT_SHA@"