Skip to content

[SIT] Move skip layers check to be before passing the tensor to the metrics#33960

Merged
svigh merged 3 commits intoopenvinotoolkit:masterfrom
svigh:EISW-200527_skip_layer_all_metrics
Feb 5, 2026
Merged

[SIT] Move skip layers check to be before passing the tensor to the metrics#33960
svigh merged 3 commits intoopenvinotoolkit:masterfrom
svigh:EISW-200527_skip_layer_all_metrics

Conversation

@svigh
Copy link
Contributor

@svigh svigh commented Feb 4, 2026

Details:

  • Skip the output layers before passing the tensors to the metric functions, now all metrics can skip output layers

Tickets:

@svigh svigh requested review from atamas19, Copilot and fcmiron February 4, 2026 09:05
@svigh svigh requested review from a team as code owners February 4, 2026 09:05
@github-actions github-actions bot added the category: NPU OpenVINO NPU plugin label Feb 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the output layer skipping logic in the single-image-test tool by moving the filtering operation to a centralized location before tensors are passed to metric functions. Previously, each metric function (testRRMSE, testMAP, testNRMSE) implemented its own skip layer check, leading to code duplication.

Changes:

  • Centralized skip layer filtering logic before metric function calls
  • Removed duplicate skip layer checks from individual metric functions (testRRMSE, testMAP, testNRMSE)
  • Applied minor formatting improvements to testSSDDetection function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3058 to +3060
std::vector<std::string> skipped_layers = splitStringList(FLAGS_skip_output_layers, ';');
for (const auto& [tensorName, tensor] : outputTensors) {
if (std::find(skipped_layers.begin(), skipped_layers.end(), tensorName) != skipped_layers.end()) {
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linear search through skipped_layers is performed for every output tensor. Consider converting skipped_layers to an std::unordered_set for O(1) lookup performance, especially if there are many output layers or skipped layers.

Copilot uses AI. Check for mistakes.
@svigh svigh added this pull request to the merge queue Feb 5, 2026
Merged via the queue into openvinotoolkit:master with commit 3f4a50f Feb 5, 2026
186 checks passed
@svigh svigh deleted the EISW-200527_skip_layer_all_metrics branch February 5, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NPU OpenVINO NPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants