Adding Estimate NPU Latency pass and unit test#2178
Open
alinah-amd wants to merge 10 commits intomicrosoft:mainfrom
Open
Adding Estimate NPU Latency pass and unit test#2178alinah-amd wants to merge 10 commits intomicrosoft:mainfrom
alinah-amd wants to merge 10 commits intomicrosoft:mainfrom
Conversation
Author
@microsoft-github-policy-service agree company="AMD" |
jambayk
reviewed
Sep 23, 2025
jambayk
reviewed
Oct 1, 2025
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jambayk
reviewed
Oct 3, 2025
jambayk
reviewed
Oct 3, 2025
jambayk
reviewed
Oct 3, 2025
jambayk
reviewed
Oct 10, 2025
| optuna | ||
| pandas | ||
| peft | ||
| perf-estimator |
Contributor
There was a problem hiding this comment.
there is no package called perf-estimator on pypi
Author
There was a problem hiding this comment.
Yes, we are working to push the package into pypi. Will update once that is done.
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.
Describe your changes
Overview
Added the EstimateNPULatency pass under
olive/onnx/vitis_ai/estimate_latency.pyEstimateNPULatency makes use of the NPU Perf Estimator tool to predict computational performance of workloads given a set of parameters.
This is an analysis pass and does not transform the graph at all. Used for performance analysis only.
Installation
To install (if not installed through requirements.txt), run the following:
pip install [placeholder for wheel]Confirm python version installed is >= 3.10 for compatibility.
If perf estimator package is not installed, the following warning will show and the pass will simply be bypassed:

Usage
Inputs
EstimateNPULatency takes in both the model in the form of an
OnnxModelHandlerobject and a list of optional parameters in the form of a dict ofPassConfigParams(consistent with all other passes).Optional Parameters
To pass in optional parameters, list parameter name and parameter value as key-value pairs in the json file. See example:
strstx["stx"]Adding Pass to Config File
Should ideally be run as the last pass and listed last in the
<model>.jsonfile. For example:Output
Generates a
concise_summarydirectory within the run directory with the following files:{model_name}_concise_summary.txtwill display the following info on roofline latency, total compute ops, and what conclusion can be drawn on performance bottleneck (whether it is DDR Bandwidth bound or Compute bound):{model_name}_concise_summary.csvwill display the same info but specific to per op. Ops are listed in descending order of latency:Known Passing Tests
Resnet w/ Perf Estimator
Refer to Olive Recipes Repo
MobileNet w/ Perf Estimator
Refer to Olive Recipes Repo
Unit Test
python -m pytest test/unit_test/passes/vitis_ai/test_estimate_latency.pyChecklist before requesting a review
lintrunner -a(Optional) Issue link