Skip to content

fix(perf): op-tracing preflight check before benchmark run#330

Closed
xieofxie wants to merge 6 commits into
mainfrom
hualxie/fix-bug-A-new
Closed

fix(perf): op-tracing preflight check before benchmark run#330
xieofxie wants to merge 6 commits into
mainfrom
hualxie/fix-bug-A-new

Conversation

@xieofxie
Copy link
Copy Markdown
Contributor

Summary

  • Move is_qnn_profiling_available() check to before PerfBenchmark.run() so wmk perf --op-tracing fails fast instead of wasting a full benchmark run when onnxruntime-qnn is not installed.

Test plan

  • TestOpTracingPreflight::test_benchmark_does_not_run_when_qnn_unavailable — verifies PerfBenchmark.run() is never called when QNN profiling is unavailable and exit code is non-zero

Extracted from #209 (Bug A only).

🤖 Generated with Claude Code

hualxie and others added 2 commits April 14, 2026 10:50
Move is_qnn_profiling_available() preflight check to before PerfBenchmark.run()
so the command fails fast instead of wasting a full benchmark run.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@xieofxie xieofxie requested a review from a team as a code owner April 14, 2026 02:50
Copy link
Copy Markdown
Collaborator

@tezheng tezheng left a comment

Choose a reason for hiding this comment

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

LGTM. The preflight check is correctly placed at the try-block level (covers both ONNX and HF paths) before benchmark.run(). Old duplicate check properly removed. Ruff clean.

Minor note (non-blocking):

  • Could add an ONNX-path test to complement the HF-path test, but not a blocker.

@xieofxie
Copy link
Copy Markdown
Contributor Author

dup of #397

@xieofxie xieofxie closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants