fix(perf): generalize op-tracing availability check and align trace output path#1000
Merged
Conversation
added 2 commits
June 30, 2026 10:58
DingmaomaoBJTU
approved these changes
Jun 30, 2026
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.
Summary
Tightens and generalizes the
--op-tracingpath inwinml perf, plus a QNN profiler session fix.is_qnn_profiling_available()→is_profiling_available(resolved_ep, resolved_device, op_tracing). Instead of only probing ORT for the QNN provider, it now validates the benchmark's resolved EP/device/level against the single combination op-tracing currently supports — QNN EP + NPU +basic. EP aliases (e.g.qnn) are normalized, and device/level comparisons are case-insensitive. Supported values live in module constants so they are easy to expand as more tracers land.resolved_ep/resolved_deviceproperties onPerfBenchmarkso the CLI can gate op-tracing on what actually drove the build/inference, with an error message that reports the resolved values.output:a/b.json→a/b_op_trace.json, instead of being rebuilt from the model name.add_ep_for_device(...)for the NPU device (failing fast if it cannot be added) rather than passingproviders=[...]directly, and switch provider options to a single dict.Tests
tests/unit/optracing/test_detection.pyfor the new signature: supported combo, alias normalization, case-insensitivity, and a parametrized table of unsupported combinations.uv run pytest tests/unit/optracing/test_detection.py— 11 passed.