[SIT] Add post proc options for l2norm#36900
Open
svigh wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Intel NPU single-image-test tool’s l2norm comparison mode with optional output dequantization (scale + zero-point) so quantized inference outputs can be converted before computing the L2 norm against reference tensors.
Changes:
- Added new CLI flags
l2norm_dequant_scaleandl2norm_dequant_zp(global or per-output) and surfaced them in tool help output. - Updated
l2normcomputation path to optionally dequantize the inference output before comparison, leaving the reference tensor untouched. - Added helper utilities to distinguish global vs explicit per-layer (per-output) values.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/plugins/intel_npu/tools/single-image-test/README.md |
Documents new l2norm dequantization flags. |
src/plugins/intel_npu/tools/single-image-test/main.cpp |
Implements optional dequantization in l2norm metric evaluation. |
src/plugins/intel_npu/tools/single-image-test/argument_parse_helpers.hpp |
Declares new flags and adds helpers for global vs explicit per-layer values. |
src/plugins/intel_npu/tools/single-image-test/argument_parse_helpers.cpp |
Defines new flags, prints them in l2norm mode, and implements the new helper functions. |
Comment on lines
+117
to
+121
| -l2norm_dequant_zp (Optional. Dequantization zero point used together | ||
| with --l2norm_dequant_scale for 'l2norm' mode. Can be a single global | ||
| value or per-output: 'output1:128;output2:0'. Defaults to 0 for any | ||
| output without an explicit value. Has no effect unless | ||
| --l2norm_dequant_scale is set.) type: string default: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
Tickets:
AI Assistance: